summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-01-20 02:39:29 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-01-20 02:39:29 +0100
commitc28d7791960e636411399fa32345c676199c5bc8 (patch)
tree922c221551da436240f29a6ec2d35118155b2e39
parent56f26fe87cd84869f2b2d2f88b6636d865932ca6 (diff)
cfgfs: make partition detection working with util-linux and busybox fdisk
-rw-r--r--package/cfgfs/Makefile3
-rw-r--r--package/cfgfs/src/fwcf.sh5
2 files changed, 4 insertions, 4 deletions
diff --git a/package/cfgfs/Makefile b/package/cfgfs/Makefile
index 876c3096b..31d20ad1d 100644
--- a/package/cfgfs/Makefile
+++ b/package/cfgfs/Makefile
@@ -5,7 +5,7 @@ include ${ADK_TOPDIR}/rules.mk
PKG_NAME:= cfgfs
PKG_VERSION:= 1.0.10
-PKG_RELEASE:= 3
+PKG_RELEASE:= 4
PKG_DESCR:= compressed config filesystem
PKG_SECTION:= base/apps
PKG_URL:= http://openadk.org/
@@ -14,6 +14,7 @@ PKG_CFLINE_CFGFS:= select BUSYBOX_COMM@
PKG_CFLINE_CFGFS+= select BUSYBOX_DIFF@
PKG_CFLINE_CFGFS+= select BUSYBOX_MD5SUM@
PKG_CFLINE_CFGFS+= select BUSYBOX_XARGS@
+PKG_CFLINE_CFGFS+= select BUSYBOX_RDEV@
PKG_CFLINE_CFGFS+= select BUSYBOX_SORT@
PKG_CFLINE_CFGFS+= select BUSYBOX_FEATURE_SORT_BIG@
PKG_CFLINE_CFGFS+= depends on !ADK_TARGET_ROOTFS_NFSROOT && !ADK_TARGET_ROOTFS_INITRAMFSPIGGYBACK && !ADK_TARGET_ROOTFS_INITRAMFS && !ADK_TARGET_ROOTFS_INITRAMFSARCHIVE && !ADK_TARGET_ROOTFS_JFFS2 && !ADK_TARGET_ROOTFS_SQUASHFS && !ADK_TARGET_ROOTFS_ISO
diff --git a/package/cfgfs/src/fwcf.sh b/package/cfgfs/src/fwcf.sh
index e690adc28..ea8452850 100644
--- a/package/cfgfs/src/fwcf.sh
+++ b/package/cfgfs/src/fwcf.sh
@@ -132,13 +132,12 @@ echo $rootdisk|grep mmcblk >/dev/null 2>&1
if [ $? -ne 0 ]; then
rootdisk=${rootdisk%[1-9]}
fi
-part=$(fdisk -l $rootdisk 2>/dev/null|awk '$8 == 88 { print $1 }')
+part=$(fdisk -l $rootdisk 2>/dev/null|grep '^/dev'|tail -1|awk '{ print $1 }')
if [ -f .cfgfs ]; then
. /.cfgfs
fi
if [ -z $part ]; then
- # fallback to /dev/sda in case of encrypted root
- part=$(fdisk -l /dev/sda 2>/dev/null|awk '$8 == 88 { print $1 }')
+ part=$(fdisk -l /dev/sda 2>/dev/null|grep '^/dev'|tail -1|awk '{ print $1 }')
if [ -z $part ]; then
# otherwise search for MTD device with name cfgfs
part=/dev/mtd$(fgrep '"cfgfs"' /proc/mtd 2>/dev/null | sed 's/^mtd\([^:]*\):.*$/\1/')ro