If device is encrypted, skip resizefs and fsck for /opt/usr.
Change-Id: Ib563b522f8eef201aca4c7103a2166d576e7051a
DATAFS=`/sbin/blkid -t PARTLABEL=system-data -o device`
fi
+USERFS=`/sbin/blkid -L user`
+if [ x$USERFS = "x" ]
+then
+ USERFS=`/sbin/blkid -t PARTLABEL=user -o device`
+fi
+
NEED_RESIZEFS=1
+USERFS_ENCRYPTED=0
if [ x"$DATAFS" != "x" ]
then
/sbin/fsck -y $DATAFS
/bin/mount $DATAFS /opt
+ # The device is being encrypted or encrypted.
+ if [ -e /opt/etc/.odeprogress -o -e /opt/etc/.ode_* ]
+ then
+ USERFS_ENCRYPTED=1
+ fi
+
if [ -e /opt/var/.resizefs_done ]
then
NEED_RESIZEFS=0
fi
fi
+if [ x"$USERFS" != "x" -a "$USERFS_ENCRYPTED" = "0" ]
+then
+ if [ "$NEED_RESIZEFS" = "1" ]
+ then
+ /sbin/resize2fs -f $USERFS
+ fi
+ /sbin/fsck -y $USERFS
+fi
+
if [ -e /sysroot/opt/sqsh_usr.img ]
then
if [ ! -d /sysroot/usr ]