summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMyoungJune Park <mj2004.park@samsung.com>2017-10-30 01:52:19 (GMT)
committerMyoungJune Park <mj2004.park@samsung.com>2017-10-30 01:52:59 (GMT)
commit3f07f2cda3e23c51979b0bbf83f4b2ca2a4de1a1 (patch)
tree73ed785b73f410db8a0cfe654369f5a528a78ea8
parente0822df86f0668a623a13471ee9bc81cba0c07e0 (diff)
downloadfactory-reset-submit/tizen/20171031.030559.zip
factory-reset-submit/tizen/20171031.030559.tar.gz
factory-reset-submit/tizen/20171031.030559.tar.bz2
Change-Id: I40943fe418ce723041e2023c88f08b34a2ba90bc Signed-off-by: MyoungJune Park <mj2004.park@samsung.com>
-rwxr-xr-xscript/run-factory-reset.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/run-factory-reset.sh b/script/run-factory-reset.sh
index 800a413..5486906 100755
--- a/script/run-factory-reset.sh
+++ b/script/run-factory-reset.sh
@@ -125,7 +125,8 @@ fs_ready() {
/bin/mkdir -p $USRDATADIR
/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=`/bin/grep "$USRDATADIR" /etc/fstab | /usr/bin/awk '{print $1}'`
+ device=`blkid --match-token PARTLABEL=user -o device`
device=`/usr/bin/readlink -f $device`
if [[ "z$mret" != "z" && "$mret" != "$device" ]]; then
echo "$mret != $device" >> $logfile
@@ -136,6 +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`
/sbin/mkfs.$fstype $device -F
/bin/mount -t $fstype $device $USRDATADIR
fi