aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xfunctions.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/functions.sh b/functions.sh
index 2c9773b..e4128fb 100755
--- a/functions.sh
+++ b/functions.sh
@@ -435,6 +435,10 @@ function jumpchroot() {
ERRORN=$((${ERRORN}+1))
fi
else
+ # Prevent build machine mounts to be incoporated into the initrd.
+ mkdir -p "${BUILD_PATH}/etc/dracut.conf.d"
+ echo 'use_fstab="yes"' >"${BUILD_PATH}/etc/dracut.conf.d/50-use-fstab.conf"
+
print_info "/sbin/chroot --userspec root:root ${BUILD_PATH} /usr/bin/bash -v -c 'bash /second_stage_install.sh 2>&1'"
/sbin/chroot --userspec root:root "${BUILD_PATH}" /usr/bin/bash -v -c 'bash /second_stage_install.sh 2>&1'
RET=${?}
@@ -442,6 +446,9 @@ function jumpchroot() {
error "line ${LINENO} Warning : chrooting to ${BUILD_PATH} retrurn an error ${RET}"
ERRORN=$((${ERRORN}+1))
fi
+
+ # Prevent build machine mounts to be incoporated into the initrd.
+ rm -f "${BUILD_PATH}/etc/dracut.conf.d/50-use-fstab.conf"
fi
return 0