summaryrefslogtreecommitdiffstats
path: root/rescue
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-07-05 15:00:14 +0000
committerOlivier Blin <oblin@mandriva.com>2007-07-05 15:00:14 +0000
commitf8a7c06f05ae503cb05d5062498bbacf5e29b36d (patch)
treeb7c8cd4933fa2ccce0249bf9a56dc97d6e93511a /rescue
parentfe095d58fb839af3647131501d6c69b635bee276 (diff)
downloaddrakx-backup-do-not-use-f8a7c06f05ae503cb05d5062498bbacf5e29b36d.tar
drakx-backup-do-not-use-f8a7c06f05ae503cb05d5062498bbacf5e29b36d.tar.gz
drakx-backup-do-not-use-f8a7c06f05ae503cb05d5062498bbacf5e29b36d.tar.bz2
drakx-backup-do-not-use-f8a7c06f05ae503cb05d5062498bbacf5e29b36d.tar.xz
drakx-backup-do-not-use-f8a7c06f05ae503cb05d5062498bbacf5e29b36d.zip
make sure version is detected before trying to mount usb root
Diffstat (limited to 'rescue')
-rw-r--r--rescue/Flash/scripts/rescue_common7
1 files changed, 4 insertions, 3 deletions
diff --git a/rescue/Flash/scripts/rescue_common b/rescue/Flash/scripts/rescue_common
index 69dc3d182..4d8a80c67 100644
--- a/rescue/Flash/scripts/rescue_common
+++ b/rescue/Flash/scripts/rescue_common
@@ -1,6 +1,7 @@
#!/bin/bash
function detect_version() {
+ version=""
if has_label Share; then
version="1.0"
elif has_label MDVUSBROOT; then
@@ -10,6 +11,8 @@ function detect_version() {
fi
usbroot_device=$_device
source_version_variables
+
+ [ -n "$version" ]
}
function source_version_variables {
@@ -105,9 +108,7 @@ function insert_pendrive() {
echo -n 'Detecting pen drive: '
for ((i=0; $i <= 15 ; i++)); do
- detect_version
-
- nash --force > /dev/null 2>&1 <<EOF
+ detect_version && nash --force > /dev/null 2>&1 <<EOF
mount -t vfat LABEL=$label $_tmpdir
EOF
if [ $? -ne 0 ]; then