Allow the user to use wrap as a build step

This commit is contained in:
MaxHearnden 2023-11-28 04:48:00 +00:00
parent b7c57cac8b
commit f7adeba3d8
3 changed files with 36 additions and 5 deletions

View file

@ -114,6 +114,15 @@ else
SYSC=/sysc_image
sys_transfer "${SYSC}" /sysc gzip patch
if [ "${CHROOT_ONLY_SYSA}" != True ]; then
if [ "${CHROOT_WRAP}" = True ]; then
# bind mount dev, proc and sys into new root
mkdir -p "${SYSC}/dev"
mount --no-mtab --rbind /dev "${SYSC}/dev"
mkdir -p "${SYSC}/proc"
mount --no-mtab --rbind /proc "${SYSC}/proc"
mkdir -p "${SYSC}/sys"
mount --no-mtab --rbind /sys "${SYSC}/sys"
fi
exec chroot "${SYSC}" /init
fi
fi