summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunmin Lee <sunm.lee@samsung.com>2017-11-03 12:21:55 +0900
committerSunmin Lee <sunm.lee@samsung.com>2017-11-03 14:08:02 +0900
commit0cb743032addad41c2dc73cc2101e62216d58c8c (patch)
treef23e439084bd4e848af63d3b1098ee4c5df48c0e
parent3f07f2cda3e23c51979b0bbf83f4b2ca2a4de1a1 (diff)
downloadfactory-reset-0cb743032addad41c2dc73cc2101e62216d58c8c.tar.gz
factory-reset-0cb743032addad41c2dc73cc2101e62216d58c8c.tar.bz2
factory-reset-0cb743032addad41c2dc73cc2101e62216d58c8c.zip
Use filesystem label instead of partition labelsubmit/tizen/20171120.060354accepted/tizen/unified/20171120.151303
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>
-rwxr-xr-xscript/run-factory-reset.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/script/run-factory-reset.sh b/script/run-factory-reset.sh
index 5486906..30307fe 100755
--- a/script/run-factory-reset.sh
+++ b/script/run-factory-reset.sh
@@ -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