summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rw-r--r--functions5
1 files changed, 4 insertions, 1 deletions
diff --git a/functions b/functions
index e5e16a3..a2e1431 100644
--- a/functions
+++ b/functions
@@ -955,8 +955,11 @@ setup_etc () {
UMOUNT_DIRS=
umount_exit_function () {
+ local realdir
for dir in $UMOUNT_DIRS; do
- ( cd / ; umount "$TARGET/${dir#/}" ) || true
+ realdir="$(in_target_nofail readlink -f "$dir")"
+ [ "$realdir" ] || continue
+ ( cd / ; umount "$TARGET/${realdir#/}" ) || true
done
}