From 0afe81f970dbfb499d5cf16d934a42cdcab79356 Mon Sep 17 00:00:00 2001 From: taeyoung Date: Wed, 10 Aug 2016 11:55:37 +0900 Subject: upgrade: enable sdbd when usb cable is connected during updating - sdb enabling needs to be performed just after udc is enabled. To detect udc state change, udev rule is used. Change-Id: I2de18cc9f19f6a34fd7307d17a14c607fc111626 Signed-off-by: taeyoung --- packaging/system-plugin.spec | 2 ++ upgrade/update.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec index b791dba..031eb88 100644 --- a/packaging/system-plugin.spec +++ b/packaging/system-plugin.spec @@ -157,6 +157,7 @@ mkdir -p %{buildroot}%{_unitdir}/system-update.target.wants 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 %{_datadir}/upgrade %{buildroot}/system-update +install -m 644 rules/99-sdb-switch.rules %{buildroot}%{_prefix}/lib/udev/rules.d/ %clean rm -rf %{buildroot} @@ -260,3 +261,4 @@ mv %{_sysconfdir}/fstab_initrd %{_sysconfdir}/fstab %{_unitdir}/offline-update.service %{_unitdir}/system-update.target.wants/offline-update.service /system-update +%{_prefix}/lib/udev/rules.d/99-sdb-switch.rules diff --git a/upgrade/update.sh b/upgrade/update.sh index ab46c9a..672b4cc 100755 --- a/upgrade/update.sh +++ b/upgrade/update.sh @@ -7,6 +7,7 @@ RESULT_FILE=/upgrade_result RUN=/bin/sh rm /system-update +rm /usr/lib/udev/rules.d/99-sdb-switch.rules if [ ! -d ${PATCH_DIR} ] then -- cgit v1.2.3