diff options
author | Cody A.W. Somerville <cody.somerville@canonical.com> | 2009-06-02 22:19:20 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:09:44 +0100 |
commit | 6d1a6c18548a304584b3d34c1d471639911186cf (patch) | |
tree | 7303935e3272435ef2f5a64849b849169414ed7e /functions | |
parent | a4911c8387388b4ffce8b536a327de61796b29fa (diff) | |
download | live-build-6d1a6c18548a304584b3d34c1d471639911186cf.zip live-build-6d1a6c18548a304584b3d34c1d471639911186cf.tar.gz |
Unmounting all mounts in chroot.
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/exit.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/functions/exit.sh b/functions/exit.sh index 980d2d1..16dda8c 100755 --- a/functions/exit.sh +++ b/functions/exit.sh @@ -18,10 +18,10 @@ Exit () # Always exit true in case we are not able to unmount # (e.g. due to running processes in chroot from user customizations) Echo_message "Begin unmounting filesystems..." - umount chroot/dev/pts > /dev/null 2>&1 || true - umount chroot/proc > /dev/null 2>&1 || true - umount chroot/selinux > /dev/null 2>&1 || true - umount chroot/sys > /dev/null 2>&1 || true + for DIRECTORY in $(awk -v dir="${PWD}/chroot/" '$2 ~ dir { print $2 }' /proc/mounts | sort -r) + do + umount ${DIRECTORY} > /dev/null 2>&1 || true + done } Setup_cleanup () |