summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf
diff options
context:
space:
mode:
Diffstat (limited to 'share/scripts/debconf')
-rwxr-xr-xshare/scripts/debconf30
1 files changed, 30 insertions, 0 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index f4f63d4..1c5884b 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -991,12 +991,42 @@ Cleanup_system "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}"
## Specific parts
cp -a "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" "${MACHINES}/${NAME}"
+# Mounting bind mounts
+if [ -n "${BIND}" ]
+then
+ BINDS="$(echo ${BIND} | sed -e 's|;| |g')"
+
+ for ENTRY in ${BINDS}
+ do
+ SOURCE="$(echo ${ENTRY} | awk -F: '{ print $1 }')"
+ TARGET="$(echo ${ENTRY} | awk -F: '{ print $2 }')"
+
+ mkdir -p "${SOURCE}"
+ mkdir -p "${MACHINES}/${NAME}/${TARGET}"
+
+ mount -o bind "${SOURCE}" "${MACHINES}/${NAME}/${TARGET}"
+ done
+fi
+
Configure_system "${MACHINES}/${NAME}"
Configure_network "${MACHINES}/${NAME}"
Cleanup_system "${MACHINES}/${NAME}"
Commands "${MACHINES}/${NAME}"
+# Unmounting bind mounts
+if [ -n "${BIND}" ]
+then
+ BINDS="$(echo ${BIND} | sed -e 's|;| |g')"
+
+ for ENTRY in ${BINDS}
+ do
+ TARGET="$(echo ${ENTRY} | awk -F: '{ print $2 }')"
+
+ umount "${MACHINES}/${NAME}/${TARGET}"
+ done
+fi
+
# remove debconf temporary files
#FIXME
#echo rm --preserve-root --one-file-system -rf "${DEBCONF_TMPDIR}"