Browse Source

cfgfs: fix a problem when device use mmcblk1 as primary block device

Waldemar Brodkorb 9 years ago
parent
commit
6afea827d7
2 changed files with 6 additions and 2 deletions
  1. 1 1
      package/cfgfs/Makefile
  2. 5 1
      package/cfgfs/src/fwcf.sh

+ 1 - 1
package/cfgfs/Makefile

@@ -5,7 +5,7 @@ include ${ADK_TOPDIR}/rules.mk
 
 PKG_NAME:=		cfgfs
 PKG_VERSION:=		1.0.10
-PKG_RELEASE:=		1
+PKG_RELEASE:=		2
 PKG_DESCR:=		compressed config filesystem
 PKG_SECTION:=		base/apps
 PKG_URL:=		http://openadk.org/

+ 5 - 1
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