A couple of fixes wrt bootstrap.cfg

Correctly source. export so that scripts can access.
This commit is contained in:
fosslinux 2021-10-14 21:31:45 +11:00
parent b0f9c00ef3
commit 5dbf82e8e4
3 changed files with 10 additions and 7 deletions

View File

@ -92,10 +92,16 @@ fi
echo "Thank you! All done." echo "Thank you! All done."
# Clear up some RAM space
grep '^pkg=' /after.kaem | sed 's/pkg="//' | sed 's/=$//' | while read -r p ; do
rm -rf "${SOURCES:?}/${p:?}"
done
rm -rf "${SOURCES}/mes"
# Write to bootstrap.cfg # Write to bootstrap.cfg
rm "${SOURCES}/bootstrap.cfg" rm "${SOURCES}/bootstrap.cfg"
for var in CHROOT FORCE_TIMESTAMPS DISK; do for var in CHROOT FORCE_TIMESTAMPS DISK; do
echo "${var}=${!var}" >> "${SOURCES}/bootstrap.cfg" echo "export ${var}=${!var}" >> "${SOURCES}/bootstrap.cfg"
done done
build flex-2.5.11 build flex-2.5.11
@ -233,10 +239,6 @@ build make-3.82
grep '^build' "${SOURCES}/run.sh" | sed "s/build //" | sed "s/ .*$//" | while read -r p ; do grep '^build' "${SOURCES}/run.sh" | sed "s/build //" | sed "s/ .*$//" | while read -r p ; do
rm -rf "${SOURCES:?}/${p:?}" rm -rf "${SOURCES:?}/${p:?}"
done done
grep '^pkg=' /after.kaem | sed 's/pkg="//' | sed 's/=$//' | while read -r p ; do
rm -rf "${SOURCES:?}/${p:?}"
done
rm -rf "${SOURCES}/mes"
if [ "${CHROOT}" = False ]; then if [ "${CHROOT}" = False ]; then
build kexec-tools-2.0.22 build kexec-tools-2.0.22
@ -250,4 +252,5 @@ fi
# In chroot mode transition directly into System C. # In chroot mode transition directly into System C.
SYSC="/sysc" SYSC="/sysc"
cp -R "${PREFIX}" "${SYSC}" cp -R "${PREFIX}" "${SYSC}"
cp "${SOURCES}/bootstrap.cfg" "${SYSC}/usr/src/"
exec chroot "${SYSC}" /init exec chroot "${SYSC}" /init

View File

@ -59,7 +59,7 @@ if [ -z "${DISK}" ] || ! [ -e "/dev/${DISK}" ]; then
ask_disk ask_disk
fi fi
echo "DISK=${DISK}" >> /usr/src/bootstrap.cfg echo "export DISK=${DISK}" >> /usr/src/bootstrap.cfg
# Otherwise, add stuff from sysa to sysb # Otherwise, add stuff from sysa to sysb
echo "Mounting sysc" echo "Mounting sysc"

View File

@ -14,7 +14,7 @@ trap 'env - PATH=${PREFIX}/bin PS1="\w # " bash -i' EXIT
# shellcheck source=sysglobal/helpers.sh # shellcheck source=sysglobal/helpers.sh
. helpers.sh . helpers.sh
# shellcheck source=/dev/null # shellcheck source=/dev/null
. helpers.sh . bootstrap.cfg
trap bash EXIT trap bash EXIT