From 4ebd0b605c8e5878438357f54e3de6e0db6d7eff Mon Sep 17 00:00:00 2001 From: fosslinux Date: Sat, 13 Jan 2024 18:27:36 -0800 Subject: [PATCH] external sources arg --- rootfs.py | 1 + steps/improve/finalize_fhs.sh | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/rootfs.py b/rootfs.py index 2369d201..074169c5 100755 --- a/rootfs.py +++ b/rootfs.py @@ -37,6 +37,7 @@ def create_configuration_file(args): config.write(f"INTERNAL_CI={args.internal_ci or False}\n") config.write(f"INTERACTIVE={args.interactive}\n") config.write(f"BARE_METAL={args.bare_metal}\n") + config.write(f"EXTERNAL_SOURCES={args.external_sources}\n") if (args.bare_metal or args.qemu) and not args.kernel: if args.repo or args.external_sources: config.write("DISK=sdb1\n") diff --git a/steps/improve/finalize_fhs.sh b/steps/improve/finalize_fhs.sh index e2a238d8..517cddab 100755 --- a/steps/improve/finalize_fhs.sh +++ b/steps/improve/finalize_fhs.sh @@ -23,6 +23,8 @@ mount | grep '/sys' &> /dev/null || (mkdir -p /sys; mount -t sysfs sysfs /sys) mount | grep '/tmp' &> /dev/null || (mkdir -p /tmp; mount -t tmpfs tmpfs /tmp) mount | grep '/dev/shm' &> /dev/null || (mkdir -p /dev/shm; mount -t tmpfs tmpfs /dev/shm) -# Add /etc/resolv.conf -echo 'nameserver 1.1.1.1' > /etc/resolv.conf -echo 'nameserver 1.1.1.1' > /etc/resolv.conf.head +if [ "${EXTERNAL_SOURCES}" = "False" ]; then + # Add /etc/resolv.conf + echo 'nameserver 1.1.1.1' > /etc/resolv.conf + echo 'nameserver 1.1.1.1' > /etc/resolv.conf.head +fi