diff options
Diffstat (limited to 'pbuilder-modules')
-rw-r--r-- | pbuilder-modules | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/pbuilder-modules b/pbuilder-modules index 9e4e9ad..a71e1f0 100644 --- a/pbuilder-modules +++ b/pbuilder-modules @@ -170,6 +170,18 @@ EOF } function umountproc () { + # push arguments on a stack to reverse direction. + local reversed + reversed= + for mnt in $BINDMOUNTS; do + reversed="$mnt $reversed" + done + for mnt in $reversed; do + umount_one "$mnt" + done + if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then + umount_one "selinux" + fi if [ "$USEDEVPTS" = "yes" ]; then umount_one "dev/pts" fi @@ -182,18 +194,6 @@ function umountproc () { fi umount_one "proc" fi - if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then - umount_one "selinux" - fi - # push arguments on a stack to reverse direction. - local reversed - reversed= - for mnt in $BINDMOUNTS; do - reversed="$mnt $reversed" - done - for mnt in $reversed; do - umount_one "$mnt" - done } |