summaryrefslogtreecommitdiff
path: root/upgrade/update.sh
diff options
context:
space:
mode:
authorSunmin Lee <sunm.lee@samsung.com>2016-08-05 19:45:54 +0900
committerSunmin Lee <sunm.lee@samsung.com>2016-08-09 17:02:22 +0900
commit2ab6aec903f5c5789450b97fc1bf27d55e198c0f (patch)
tree3d848871bdff96f1ff7e431dce8f9b45cef60810 /upgrade/update.sh
parent5ed58f4011c1439f180594a4d762974e3a2888d9 (diff)
downloadsystem-plugin-2ab6aec903f5c5789450b97fc1bf27d55e198c0f.tar.gz
system-plugin-2ab6aec903f5c5789450b97fc1bf27d55e198c0f.tar.bz2
system-plugin-2ab6aec903f5c5789450b97fc1bf27d55e198c0f.zip
Upgrade: system upgrade package is added
For upgrade of RW partition, offline system update function of systemd is activated. Update scripts for each packages should be under the upgrade/update-script, and new files for update version should be under the upgrade/data. * The update scripts are executed alphabetically (ref: man ls). To specify the execution order explicitly, numeric prefix can be used such as: 00.first.patch.sh, 01.second.patch.sh Change-Id: I12a4a703cf252ed671ecd6d94cda5ff624e5dd87 Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
Diffstat (limited to 'upgrade/update.sh')
-rwxr-xr-xupgrade/update.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/upgrade/update.sh b/upgrade/update.sh
new file mode 100755
index 0000000..ab46c9a
--- /dev/null
+++ b/upgrade/update.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+# RW update script
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+PATCH_DIR=/usr/share/upgrade/scripts
+RESULT_FILE=/upgrade_result
+RUN=/bin/sh
+
+rm /system-update
+
+if [ ! -d ${PATCH_DIR} ]
+then
+ echo "FAIL: Upgrade directory does not exist" > ${RESULT_FILE}
+else
+ PATCHES=`/bin/ls ${PATCH_DIR}`
+
+ for PATCH in ${PATCHES}; do
+ ${RUN} ${PATCH_DIR}/${PATCH}
+ done
+
+ echo "SUCCESS: Upgrade successfully finished" > ${RESULT_FILE}
+fi
+
+systemctl reboot