summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
authorCaio Begotti <caio1982@mandriva.org>2008-11-10 19:42:21 +0000
committerCaio Begotti <caio1982@mandriva.org>2008-11-10 19:42:21 +0000
commit3467440f8cec3a786e38ad4c3c8b691fe103faf7 (patch)
tree06d86a09d9345c6bb1048b9665fb663040a37980 /rescue
parente0dad067ae5af5ff4298a3ddc683c6fc3cec3799 (diff)
downloaddrakx-3467440f8cec3a786e38ad4c3c8b691fe103faf7.tar
drakx-3467440f8cec3a786e38ad4c3c8b691fe103faf7.tar.gz
drakx-3467440f8cec3a786e38ad4c3c8b691fe103faf7.tar.bz2
drakx-3467440f8cec3a786e38ad4c3c8b691fe103faf7.tar.xz
drakx-3467440f8cec3a786e38ad4c3c8b691fe103faf7.zip
actually i believe that's a better fix as it's handled by the function which called detect_root, otherwise we'd be trapped and would not see the error and root would still be empty for write_image
Diffstat (limited to 'rescue')
-rwxr-xr-xrescue/restore-image.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/rescue/restore-image.sh b/rescue/restore-image.sh
index 3776f9222..a5021bdbd 100755
--- a/rescue/restore-image.sh
+++ b/rescue/restore-image.sh
@@ -93,14 +93,18 @@ function detect_root()
else
_msgbox "\nError writing image: disk device not detected.\n"
fi
- else
- _msgbox "\nError writing image: disk device not detected.\n"
fi
}
function write_image()
{
root=$(detect_root)
+ if [ -z ${root} ]; then
+ _msgbox "\nError writing image: disk device not detected.\n"
+ # so that netbooks using USB sticks as disks can retry (like Gdium)
+ welcome
+ fi
+
image=$(cat $images_dir/list | cut -d ',' -f 3)
extension=$(echo $image | cut -d '.' -f 3)
case $extension in