diff options
author | Sunmin Lee <sunm.lee@samsung.com> | 2016-08-05 19:45:54 +0900 |
---|---|---|
committer | Sunmin Lee <sunm.lee@samsung.com> | 2016-08-09 17:02:22 +0900 |
commit | 2ab6aec903f5c5789450b97fc1bf27d55e198c0f (patch) | |
tree | 3d848871bdff96f1ff7e431dce8f9b45cef60810 /upgrade | |
parent | 5ed58f4011c1439f180594a4d762974e3a2888d9 (diff) | |
download | system-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')
-rw-r--r-- | upgrade/data/.gitignore | 0 | ||||
-rw-r--r-- | upgrade/scripts/.gitignore | 0 | ||||
-rwxr-xr-x | upgrade/update.sh | 24 |
3 files changed, 24 insertions, 0 deletions
diff --git a/upgrade/data/.gitignore b/upgrade/data/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/upgrade/data/.gitignore diff --git a/upgrade/scripts/.gitignore b/upgrade/scripts/.gitignore new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/upgrade/scripts/.gitignore 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 |