summaryrefslogtreecommitdiff
path: root/functions/exit.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2008-10-14 21:44:48 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:43 +0100
commit4f9797c893286c3c4de99bdb906e69a615d7467e (patch)
treea12bf54bbcc24bbffa9f3446238235e93518a208 /functions/exit.sh
parentce7c2e2fe162f585d77d6d012f0487876f73ff70 (diff)
downloadvyos-live-build-4f9797c893286c3c4de99bdb906e69a615d7467e.tar.gz
vyos-live-build-4f9797c893286c3c4de99bdb906e69a615d7467e.zip
Adding unmount calls for pseudo-filesystems in Exit();.
Diffstat (limited to 'functions/exit.sh')
-rwxr-xr-xfunctions/exit.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/functions/exit.sh b/functions/exit.sh
index 2d23ff765..1c2446204 100755
--- a/functions/exit.sh
+++ b/functions/exit.sh
@@ -17,5 +17,10 @@ Exit ()
set | grep -e ^LH
fi
- # FIXME: Add /proc et al cleanup on failure
+ # Always exit true in case we are not able to unmount
+ # (e.g. due to running processes in chroot from user customizations)
+ 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
}