diff --git a/scripts/util_functions.sh b/scripts/util_functions.sh index 78d40e6ca..9441a3cc5 100644 --- a/scripts/util_functions.sh +++ b/scripts/util_functions.sh @@ -165,7 +165,7 @@ recovery_cleanup() { # find_block [partname...] find_block() { for BLOCK in "$@"; do - DEVICE=`find /dev/block -type l -iname $BLOCK | head -n 1` 2>/dev/null + DEVICE=`find /dev \( -type b -o -type c -o -type l \) -iname $BLOCK | head -n 1` 2>/dev/null if [ ! -z $DEVICE ]; then readlink -f $DEVICE return 0 @@ -372,7 +372,7 @@ find_boot_image() { fi if [ -z $BOOTIMAGE ]; then # Lets see what fstabs tells me - BOOTIMAGE=`grep -v '#' /etc/*fstab* | grep -E '/boot[^a-zA-Z]' | grep -oE '/dev/[a-zA-Z0-9_./-]*' | head -n 1` + BOOTIMAGE=`grep -v '#' /etc/*fstab* | grep -E '/boot(img)?[^a-zA-Z]' | grep -oE '/dev/[a-zA-Z0-9_./-]*' | head -n 1` fi }