summaryrefslogtreecommitdiff
path: root/package/cfgfs/src
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-09-07 17:07:35 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-09-07 17:07:35 +0200
commit6afea827d75ad7755cd8a817ce6f3606d94df950 (patch)
tree92cc66e700efd531103ea212adf263932ebe1239 /package/cfgfs/src
parentae91ac62f79892e13463740a9e6099c8a02186a4 (diff)
cfgfs: fix a problem when device use mmcblk1 as primary block device
Diffstat (limited to 'package/cfgfs/src')
-rw-r--r--package/cfgfs/src/fwcf.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/package/cfgfs/src/fwcf.sh b/package/cfgfs/src/fwcf.sh
index 8fec0422d..aa5fcdb0f 100644
--- a/package/cfgfs/src/fwcf.sh
+++ b/package/cfgfs/src/fwcf.sh
@@ -126,7 +126,11 @@ fi
rootdisk=$(readlink /dev/root)
# strip partitions (f.e. mmcblk0p2, sda2, ..)
rootdisk=${rootdisk%p*}
-rootdisk=${rootdisk%[1-9]}
+# do not cut 1-9 from mmcblk device names
+echo $rootdisk|grep mmcblk >/dev/null 2>&1
+if [ $? -ne 0 ]; then
+ rootdisk=${rootdisk%[1-9]}
+fi
part=$(fdisk -l /dev/$rootdisk 2>/dev/null|awk '$5 == 88 { print $1 }')
if [ -f .cfgfs ];then
. /.cfgfs