summaryrefslogtreecommitdiffstats
path: root/rescue/Flash
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-06-05 19:07:27 +0000
committerOlivier Blin <oblin@mandriva.com>2008-06-05 19:07:27 +0000
commita8b92daf7df5fbaa45bcb0caa1750c1d10070f81 (patch)
treec34788cc8113dc4d41f50d5a5d1eb4db844185d0 /rescue/Flash
parent11fcfa47416c81b6c30efe2da4d0502525752f61 (diff)
downloaddrakx-a8b92daf7df5fbaa45bcb0caa1750c1d10070f81.tar
drakx-a8b92daf7df5fbaa45bcb0caa1750c1d10070f81.tar.gz
drakx-a8b92daf7df5fbaa45bcb0caa1750c1d10070f81.tar.bz2
drakx-a8b92daf7df5fbaa45bcb0caa1750c1d10070f81.tar.xz
drakx-a8b92daf7df5fbaa45bcb0caa1750c1d10070f81.zip
add lumount helper to umount loopbacks (umount can't really find a
loopback is used since mount can't write the loop= option in /etc/mtab, which is a symlink to /proc/mounts)
Diffstat (limited to 'rescue/Flash')
-rw-r--r--rescue/Flash/scripts/rescue_common6
1 files changed, 6 insertions, 0 deletions
diff --git a/rescue/Flash/scripts/rescue_common b/rescue/Flash/scripts/rescue_common
index 279e5762f..e1402cacc 100644
--- a/rescue/Flash/scripts/rescue_common
+++ b/rescue/Flash/scripts/rescue_common
@@ -186,3 +186,9 @@ function progress() {
usleep 100000
}
+function lumount() {
+ local dir=$1
+ loop=$(perl -ne '@l = split; if ($l[1] eq "'$dir'") { print $l[0]; exit }' /proc/mounts)
+ umount $dir
+ losetup -d $loop
+}