diff options
author | Caio Begotti <caio1982@mandriva.org> | 2008-11-10 19:42:21 +0000 |
---|---|---|
committer | Caio Begotti <caio1982@mandriva.org> | 2008-11-10 19:42:21 +0000 |
commit | 3467440f8cec3a786e38ad4c3c8b691fe103faf7 (patch) | |
tree | 06d86a09d9345c6bb1048b9665fb663040a37980 /rescue/restore-image.sh | |
parent | e0dad067ae5af5ff4298a3ddc683c6fc3cec3799 (diff) | |
download | drakx-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/restore-image.sh')
-rwxr-xr-x | rescue/restore-image.sh | 8 |
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 |