diff options
author | Sunmin Lee <sunm.lee@samsung.com> | 2016-11-15 16:10:39 +0900 |
---|---|---|
committer | Sunmin Lee <sunm.lee@samsung.com> | 2016-11-20 22:02:20 -0800 |
commit | 2b144ee31efbf3519403df0c22864bcede7703df (patch) | |
tree | b5426f8113f9178e59c4fcd3c280d879f0d265c0 | |
parent | 5054878c415b21ba818869394aea9fbe0bcdfdf3 (diff) | |
download | system-plugin-2b144ee31efbf3519403df0c22864bcede7703df.tar.gz system-plugin-2b144ee31efbf3519403df0c22864bcede7703df.tar.bz2 system-plugin-2b144ee31efbf3519403df0c22864bcede7703df.zip |
Revert "Upgrade: Automated upgrade"submit/tizen_3.0/20161121.095219
Enable sdb debugging mode
This reverts commit 1d54574aafb44faf41ba52b3334ce9e687993cf1.
Change-Id: I7a53b95629ce4a74ded73a755961c4468499ec62
-rw-r--r-- | packaging/system-plugin.spec | 9 | ||||
-rw-r--r-- | units/init-update.service | 8 | ||||
-rw-r--r-- | units/offline-update.service | 2 | ||||
-rwxr-xr-x | upgrade/update-image.sh | 4 | ||||
-rwxr-xr-x | upgrade/update-init.sh | 2 | ||||
-rwxr-xr-x | upgrade/update.sh | 20 |
6 files changed, 24 insertions, 21 deletions
diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec index 13684a2..318b559 100644 --- a/packaging/system-plugin.spec +++ b/packaging/system-plugin.spec @@ -180,9 +180,11 @@ install -m 755 scripts/tizen-fstrim-on-charge.sh %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir} cp -r upgrade %{buildroot}%{_datadir} mkdir -p %{buildroot}%{_unitdir}/system-update.target.wants +install -m 644 units/init-update.service %{buildroot}%{_unitdir} install -m 644 units/offline-update.service %{buildroot}%{_unitdir} -ln -s ../offline-update.service %{buildroot}%{_unitdir}/system-update.target.wants/offline-update.service +ln -s ../init-update.service %{buildroot}%{_unitdir}/system-update.target.wants/init-update.service ln -s %{_datadir}/upgrade %{buildroot}/system-update +install -m 644 rules/99-sdb-switch.rules %{buildroot}%{_prefix}/lib/udev/rules.d/ # ivi install -m 755 scripts/usb_net_init.sh %{buildroot}%{_bindir} @@ -301,8 +303,11 @@ mv %{_sysconfdir}/fstab_lazymnt %{_sysconfdir}/fstab %files -n system-upgrade %{_datadir}/upgrade %{_unitdir}/offline-update.service -%{_unitdir}/system-update.target.wants/offline-update.service +%{_unitdir}/init-update.service +#%{_unitdir}/system-update.target.wants/offline-update.service +%{_unitdir}/system-update.target.wants/init-update.service /system-update +%{_prefix}/lib/udev/rules.d/99-sdb-switch.rules %files -n systemd-user-helper %manifest systemd-user-helper.manifest diff --git a/units/init-update.service b/units/init-update.service new file mode 100644 index 0000000..e438cb3 --- /dev/null +++ b/units/init-update.service @@ -0,0 +1,8 @@ +[Unit] +Description=System update initialize service +Requires=sysinit.target +After=sysinit.target + +[Service] +Type=simple +ExecStart=/system-update/update-init.sh diff --git a/units/offline-update.service b/units/offline-update.service index c90b4e0..ed00616 100644 --- a/units/offline-update.service +++ b/units/offline-update.service @@ -1,7 +1,7 @@ [Unit] Description=System update script service Requires=sysinit.target -After=sysinit.target +After=sysinit.target init-update.service [Service] Type=simple diff --git a/upgrade/update-image.sh b/upgrade/update-image.sh index 6d73b74..fd20bcf 100755 --- a/upgrade/update-image.sh +++ b/upgrade/update-image.sh @@ -4,8 +4,8 @@ # # Back rpm db up for Tizen 3.0 -mkdir /usr/share/upgrade/data/rpm -cp -arf /var/lib/rpm/* /usr/share/upgrade/data/rpm +mkdir /system-update/data/rpm +cp -arf /var/lib/rpm/* /system-update/data/rpm # remove RW partitions' files rm -rf /opt/* diff --git a/upgrade/update-init.sh b/upgrade/update-init.sh index 63f993b..43e33ad 100755 --- a/upgrade/update-init.sh +++ b/upgrade/update-init.sh @@ -23,7 +23,7 @@ gum-utils --offline -u --uid 5001 # Copy 3.0 rpm db rm -rf /var/lib/rpm/* -cp -arf /usr/share/upgrade/data/rpm/* /var/lib/rpm +cp -arf /system-update/data/rpm/* /var/lib/rpm # Disable cynara-check buxton2ctl security-disable diff --git a/upgrade/update.sh b/upgrade/update.sh index bd883d7..a4d3534 100755 --- a/upgrade/update.sh +++ b/upgrade/update.sh @@ -5,37 +5,27 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin PATCH_DIR=/usr/share/upgrade/scripts -UPDATE_DIR=/opt/upgrade -RESULT_FILE=${UPDATE_DIR}/update_result -UPDATE_LOG=${UPDATE_DIR}/update_log +RESULT_FILE=/upgrade_result RUN=/bin/sh # Change to normal mode from next booting rm /system-update +rm /usr/lib/udev/rules.d/99-sdb-switch.rules # Execute update scripts if [ ! -d ${PATCH_DIR} ] then echo "FAIL: Upgrade directory does not exist" > ${RESULT_FILE} else - mkdir -p ${UPDATE_DIR} - - echo "UPDATE: initializing" >> ${UPDATE_LOG} - ${RUN} /usr/share/upgrade/update-init.sh >> ${UPDATE_LOG} 2>&1 - PATCHES=`/bin/ls ${PATCH_DIR}` - echo "UPDATE: RW update scripts" >> ${UPDATE_LOG} for PATCH in ${PATCHES}; do - echo "${PATCH} is started..." >> ${UPDATE_LOG} - ${RUN} ${PATCH_DIR}/${PATCH} >> ${UPDATE_LOG} 2>&1 - echo "${PATCH} is ended..." >> ${UPDATE_LOG} + ${RUN} ${PATCH_DIR}/${PATCH} done - echo "UPDATE: post operations" >> ${UPDATE_LOG} - ${RUN} /usr/share/upgrade/update-post.sh >> ${UPDATE_LOG} 2>&1 + ${RUN} /usr/share/upgrade/update-post.sh - echo "SUCCESS: Upgrade successfully finished" >> ${RESULT_FILE} + echo "SUCCESS: Upgrade successfully finished" > ${RESULT_FILE} fi # Reboot |