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."
# 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
rm "${SOURCES}/bootstrap.cfg"
for var in CHROOT FORCE_TIMESTAMPS DISK; do
echo "${var}=${!var}" >> "${SOURCES}/bootstrap.cfg"
echo "export ${var}=${!var}" >> "${SOURCES}/bootstrap.cfg"
done
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
rm -rf "${SOURCES:?}/${p:?}"
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
build kexec-tools-2.0.22
@ -250,4 +252,5 @@ fi
# In chroot mode transition directly into System C.
SYSC="/sysc"
cp -R "${PREFIX}" "${SYSC}"
cp "${SOURCES}/bootstrap.cfg" "${SYSC}/usr/src/"
exec chroot "${SYSC}" /init

View File

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

View File

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