summaryrefslogtreecommitdiffstats
path: root/rescue/restore-image.sh
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-02-11 15:11:00 +0000
committerOlivier Blin <oblin@mandriva.com>2009-02-11 15:11:00 +0000
commitb2c88cdabea873d5c728cc694e571f2d095b7df8 (patch)
treeb4e3cd6df4b292e2b3326cfb3b7214b1f8689aba /rescue/restore-image.sh
parentabe503a507126b13b3b9bb5006bbaf2c25e3ffdc (diff)
downloaddrakx-b2c88cdabea873d5c728cc694e571f2d095b7df8.tar
drakx-b2c88cdabea873d5c728cc694e571f2d095b7df8.tar.gz
drakx-b2c88cdabea873d5c728cc694e571f2d095b7df8.tar.bz2
drakx-b2c88cdabea873d5c728cc694e571f2d095b7df8.tar.xz
drakx-b2c88cdabea873d5c728cc694e571f2d095b7df8.zip
make devs_found the real count
Diffstat (limited to 'rescue/restore-image.sh')
-rwxr-xr-xrescue/restore-image.sh4
1 files changed, 2 insertions, 2 deletions
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