From b9257ee2a88503f3f32aeaacfee1531b1c81035b Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Thu, 18 Jul 2013 15:27:02 -0700 Subject: [PATCH] fix(common): Read mounts from /proc/self/mounts Just in case the filesystem view is slightly different. --- common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.sh b/common.sh index b5b743d4ac..cbffa10c7c 100644 --- a/common.sh +++ b/common.sh @@ -643,7 +643,7 @@ sub_mounts() { # will). As such, we have to unmount in reverse order to cleanly # unmount submounts (think /dev/pts and /dev). awk -v path=$1 -v len="${#1}" \ - '(substr($2, 1, len) == path) { print $2 }' /proc/mounts | \ + '(substr($2, 1, len) == path) { print $2 }' /proc/self/mounts | \ tac | \ sed -e 's/\\040(deleted)$//' # Hack(zbehan): If a bind mount's source is mysteriously removed,