Upgrade: Mount user partition in upgrade mode 70/85170/7
authorSunmin Lee <sunm.lee@samsung.com>
Wed, 24 Aug 2016 04:41:41 +0000 (13:41 +0900)
committerSunmin Lee <sunm.lee@samsung.com>
Mon, 29 Aug 2016 05:26:45 +0000 (22:26 -0700)
The lazy mount makes user partition mounted
separately. For RW update, user partition also should
be mounted. This is done in the start of upgrade.

Change-Id: I3db70f3bb698d22371747530c545145836b57e09
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
upgrade/update-init.sh

index 54bcf64..a627987 100755 (executable)
@@ -5,6 +5,17 @@
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
 OWNER_HOME=/opt/usr/home/owner
 
+USER_DISK=`ls /dev/disk/by-partlabel/ | grep -i user`
+USER_MNT=/opt/usr
+
+# Mount user partition (specific to lazy mount)
+mount | grep "$USER_MNT" > /dev/null
+
+if [ $? != "0" ]
+then
+       /usr/bin/mount PARTLABEL=$USER_DISK $USER_MNT
+fi
+
 # Create home directory
 test ! -e /opt/usr/home && mkdir -p /opt/usr/home