summaryrefslogtreecommitdiffstats
path: root/share/scripts
diff options
context:
space:
mode:
authorNik Lutz <nik@netstyle.ch>2019-03-22 13:15:00 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2019-04-12 19:11:24 +0000
commit63dcc52d80c4f46012e93cd46995147eb2d2f404 (patch)
treeca3bca7b6d766644ec530c2833e2c17698a350e5 /share/scripts
parentCorrecting typo when disabling IPv6 RA in debconf container create script, th... (diff)
downloadcompute-tools-63dcc52d80c4f46012e93cd46995147eb2d2f404.tar.xz
compute-tools-63dcc52d80c4f46012e93cd46995147eb2d2f404.zip
Unmount bind mounts in reverse order to allow nested bind mounts.
Signed-off-by: Nik Lutz <nik@netstyle.ch> Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xshare/scripts/debconf6
1 files changed, 4 insertions, 2 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 0a05935..35b5969 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -1097,7 +1097,8 @@ fi
# Unmounting ro bind mounts
if [ -n "${BIND_RO}" ]
then
- BINDS_RO="$(echo ${BIND_RO} | sed -e 's|;| |g')"
+ # unmount in reverse order to allow nested bind mounts
+ BINDS_RO="$(echo ${BIND_RO} | sed -e 's|;| |g' | awk '{ for (i=NF; i>=1; i--) printf "%s ", $i; print ""}')"
for ENTRY in ${BINDS_RO}
do
@@ -1110,7 +1111,8 @@ fi
# Unmounting rw bind mounts
if [ -n "${BIND}" ]
then
- BINDS="$(echo ${BIND} | sed -e 's|;| |g')"
+ # unmount in reverse order to allow nested bind mounts
+ BINDS="$(echo ${BIND} | sed -e 's|;| |g' | awk '{ for (i=NF; i>=1; i--) printf "%s ", $i; print ""}')"
for ENTRY in ${BINDS}
do