Use filesystem label instead of partition label 81/160781/1 accepted/tizen/unified/20171120.151303 submit/tizen/20171120.060354
authorSunmin Lee <sunm.lee@samsung.com>
Fri, 3 Nov 2017 03:21:55 +0000 (12:21 +0900)
committerSunmin Lee <sunm.lee@samsung.com>
Fri, 3 Nov 2017 05:08:02 +0000 (14:08 +0900)
In some platform targets, partition label is not set.
Because filesystem label is available for all targets,
it is better to be used.

Change-Id: I8519eb665898b0244337e54a47ef40348d40ab90
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
script/run-factory-reset.sh

index 54869060a05e995c7a48104d24404b7310e81bee..30307fe65eee852d81dc2e423ea2b70577b646d0 100755 (executable)
@@ -126,7 +126,7 @@ fs_ready() {
        /bin/mount $USRDATADIR
        mret=`/bin/grep "$USRDATADIR " /proc/mounts | /usr/bin/awk '{print $1}'`
        #device=`/bin/grep "$USRDATADIR" /etc/fstab | /usr/bin/awk '{print $1}'`
-       device=`blkid --match-token PARTLABEL=user -o device`
+       device=`blkid --match-token LABEL=user -o device`
        device=`/usr/bin/readlink -f $device`
        if [[ "z$mret" != "z" && "$mret" != "$device" ]]; then
                echo "$mret != $device" >> $logfile
@@ -137,7 +137,7 @@ fs_ready() {
                # mount failed. format and remount
                echo "$USRDATADIR mount failed. format and retry to mount again" >> $logfile
                fstype=`/bin/grep "$USRDATADIR " /etc/fstab | /usr/bin/awk '{print $3}'`
-               fstype=`blkid --match-token PARTLABEL=user -o device`
+               fstype=`blkid --match-token LABEL=user -o device`
                /sbin/mkfs.$fstype $device -F
                /bin/mount -t $fstype $device $USRDATADIR
        fi