21 lines
523 B
Bash
21 lines
523 B
Bash
# Deliberately not executable. Run as:
|
|
# bash ./do_umount
|
|
|
|
# Check the environment and mount the file system if it is not mounted (to be
|
|
# sure it makes sense to umount it, rather than be umounting something else).
|
|
. ./_do_self_checks.sh
|
|
|
|
(
|
|
# If the file system had been mounted before _do_self_checks.sh, above,
|
|
# the umounts might fail for being busy, so allow errors.
|
|
set +Ee
|
|
|
|
cd $FILE_SYSTEM_DIR
|
|
for i in $CHROOT_MOUNT_SET; do
|
|
sudo umount --lazy ./$i
|
|
done 2>/dev/null
|
|
exit 0
|
|
)
|
|
|
|
sudo umount $FILE_SYSTEM_DIR
|