From: Arne Fitzenreiter Date: Wed, 14 Mar 2012 15:46:51 +0000 (+0100) Subject: partresize: fix for mmcblk devices. X-Git-Tag: v2.13-beta1~374 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac6945dbbae12ede65bfa23d5890394513af9847;p=people%2Fms%2Fipfire-2.x.git partresize: fix for mmcblk devices. --- diff --git a/src/initscripts/init.d/partresize b/src/initscripts/init.d/partresize index 8eddc46c37..ae70ff99b8 100644 --- a/src/initscripts/init.d/partresize +++ b/src/initscripts/init.d/partresize @@ -24,7 +24,11 @@ case "${1}" in # Detect device ROOT=`mount | grep -m1 " / " | cut -d" " -f1`; - DRV=${ROOT::`expr length $ROOT`-1} + if [ "${ROOT:`expr length $ROOT`-2:1}" == "p" ]; then + DRV=${ROOT::`expr length $ROOT`-2} + else + DRV=${ROOT::`expr length $ROOT`-1} + fi boot_mesg "Change Partition 4 to all free space ..." echo -e 'd\n4\nn\np\n4\n\n\nw\nq\n' | fdisk ${DRV}