summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2012-04-10 11:48:29 +0200
committerDaniel Baumann <daniel@debian.org>2012-06-04 17:39:49 +0200
commitfdfb568fc5c822b1f093f49846ac582f87546f44 (patch)
treec39fd2608248e3ec7a29f5eda1d385aa9a3d2a84 /scripts
parent204da27d32556d4e0e51a28d140b2bfc3a413bcc (diff)
downloadlive-boot-fdfb568fc5c822b1f093f49846ac582f87546f44.tar.gz
live-boot-fdfb568fc5c822b1f093f49846ac582f87546f44.zip
Improving robustness of fromiso cleanup process with is_mountpoint (Closes: #668100).
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/live10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/live b/scripts/live
index 322656e..371fac4 100755
--- a/scripts/live
+++ b/scripts/live
@@ -1595,8 +1595,14 @@ mountroot ()
# rid of it when running from RAM
if [ -n "$FROMISO" ] && [ "${TORAM}" ]
then
- losetup -d /dev/loop0
- grep -q /live/fromiso /proc/mounts && umount /live/fromiso
+ losetup -d /dev/loop0
+
+ if is_mountpoint /live/fromiso
+ then
+ umount /live/fromiso
+ rmdir --ignore-fail-on-non-empty /live/fromiso \
+ >/dev/null 2>&1 || true
+ fi
fi
if [ -n "${MODULETORAMFILE}" ] || [ -n "${PLAIN_ROOT}" ]