From a8b92daf7df5fbaa45bcb0caa1750c1d10070f81 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 5 Jun 2008 19:07:27 +0000 Subject: 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) --- rescue/Flash/scripts/rescue_common | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rescue/Flash') 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 +} -- cgit v1.2.1