diff --git a/templates/scripts/includes/deployment.sh b/templates/scripts/includes/deployment.sh index 3899aae..62eeb0c 100755 --- a/templates/scripts/includes/deployment.sh +++ b/templates/scripts/includes/deployment.sh @@ -1347,6 +1347,10 @@ if [ -n "${DATA_PARTITION}" ] ; then cat >> "${TARGET}/etc/fstab" << EOF ${DATA_PARTITION} /ngcp-data auto noatime 0 0 EOF + + # Make sure /ngcp-data is mounted inside chroot + # (some package might need to create folders structure on .postinst) + grml-chroot "${TARGET}" mount /ngcp-data fi # provide useable /ngcp-fallback read-only partition @@ -2079,6 +2083,11 @@ if [[ "${SWRAID}" = "true" ]] ; then grml-chroot "$TARGET" update-grub fi +# unmount /ngcp-data partition inside chroot (if available) +if [ -n "${DATA_PARTITION}" ] ; then + grml-chroot "${TARGET}" umount /ngcp-data +fi + # don't leave any mountpoints sync