From 1892105130c3302f1fe2eea271b57f257be3e16a Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Tue, 13 Feb 2018 15:22:50 +0100 Subject: [PATCH 1/3] Umount filesystems in reverse order than they were mounted in This will allow us to clean up the nested mounts more easily. --- functions | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions b/functions index e30687c..27458a9 100644 --- a/functions +++ b/functions @@ -1069,7 +1069,7 @@ umount_exit_function () { umount_on_exit () { if [ "$UMOUNT_DIRS" ]; then - UMOUNT_DIRS="$UMOUNT_DIRS $1" + UMOUNT_DIRS="$1 $UMOUNT_DIRS" else UMOUNT_DIRS="$1" on_exit umount_exit_function @@ -1103,8 +1103,8 @@ setup_proc () { *) umount_on_exit /dev/pts umount_on_exit /dev/shm - umount_on_exit /proc/bus/usb umount_on_exit /proc + umount_on_exit /proc/bus/usb umount "$TARGET/proc" 2>/dev/null || true in_target mount -t proc proc /proc if [ -d "$TARGET/sys" ] && \ -- 2.14.3