From b2c88cdabea873d5c728cc694e571f2d095b7df8 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 11 Feb 2009 15:11:00 +0000 Subject: make devs_found the real count --- rescue/restore-image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rescue/restore-image.sh') diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh index 9cb69d84c..c82846bbd 100755 --- a/rescue/restore-image.sh +++ b/rescue/restore-image.sh @@ -93,7 +93,7 @@ function detect_root() exit 1 fi - devs_found=$(echo $devices | wc -w) + devs_found=$(($(echo $devices | wc -w)/2)) # we might use it later again fdisk -l | grep "^/dev/" | grep -v ${dev} > /tmp/fdisk.log first_disk=$(echo ${devices} | cut -d ' ' -f 1) @@ -112,7 +112,7 @@ function detect_root() if [ -z "${root}" ]; then rm -rf /tmp/fdisk.log - if [ "$devs_found" -gt "2" ]; then + if [ "$devs_found" -gt "1" ]; then if [ ! -z ${dev} ]; then opcao=$(dialog --backtitle "$BACKTITLE" --title "$TITLE" --stdout --menu 'Choose one of the detected devices to restore to (check the blocks size column first):' 8 50 0 $devices ) if [ "$?" != "0" ]; then -- cgit v1.2.1