diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2017-01-20 02:39:29 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2017-01-20 02:39:29 +0100 |
commit | c28d7791960e636411399fa32345c676199c5bc8 (patch) | |
tree | 922c221551da436240f29a6ec2d35118155b2e39 /package/cfgfs/src | |
parent | 56f26fe87cd84869f2b2d2f88b6636d865932ca6 (diff) |
cfgfs: make partition detection working with util-linux and busybox fdisk
Diffstat (limited to 'package/cfgfs/src')
-rw-r--r-- | package/cfgfs/src/fwcf.sh | 5 |
1 files changed, 2 insertions, 3 deletions
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 |