summaryrefslogtreecommitdiffstats
path: root/rescue/Flash/scripts/rescue_common
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-07-05 14:54:43 +0000
committerOlivier Blin <oblin@mandriva.com>2007-07-05 14:54:43 +0000
commit455a658df06e5a3c92f00ea54aaf4446d026683d (patch)
tree43f17a6910ec3162327101860dbacfe600da443d /rescue/Flash/scripts/rescue_common
parentd9f8977050f484daa3e14187c7692a273dc855b4 (diff)
downloaddrakx-455a658df06e5a3c92f00ea54aaf4446d026683d.tar
drakx-455a658df06e5a3c92f00ea54aaf4446d026683d.tar.gz
drakx-455a658df06e5a3c92f00ea54aaf4446d026683d.tar.bz2
drakx-455a658df06e5a3c92f00ea54aaf4446d026683d.tar.xz
drakx-455a658df06e5a3c92f00ea54aaf4446d026683d.zip
detect partition device when looking for label (and remember it as "usbroot_device")
Diffstat (limited to 'rescue/Flash/scripts/rescue_common')
-rw-r--r--rescue/Flash/scripts/rescue_common4
1 files changed, 4 insertions, 0 deletions
diff --git a/rescue/Flash/scripts/rescue_common b/rescue/Flash/scripts/rescue_common
index 97f25385d..f8e657d72 100644
--- a/rescue/Flash/scripts/rescue_common
+++ b/rescue/Flash/scripts/rescue_common
@@ -8,6 +8,7 @@ function detect_version() {
elif has_label MDV_FLASH; then
version="2.0"
fi
+ usbroot_device=$_device
}
function has_label() {
@@ -24,6 +25,9 @@ EOF
rc=$?
+ _device=`perl -ne 'my @l = split; $l[1] eq "'$_tmpdir'" and print "$l[0]\n"' /proc/mounts`
+ [ -z "$_device" ] && rc=1
+
umount $_tmpdir 2> /dev/null
rmdir $_tmpdir 2> /dev/null