diff --git a/includes/post/cleanup.ksi b/includes/post/cleanup.ksi index c977bee..902816d 100644 --- a/includes/post/cleanup.ksi +++ b/includes/post/cleanup.ksi @@ -1,8 +1,8 @@ %post set -x -echo "Packages within this disk image" -rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' | sort -rn +# Remove the temporary 'resolv.conf' file so that the user defines it +rm -v -f /etc/resolv.conf # Remove all network connections and/or links rm -v -f /etc/sysconfig/network-scripts/ifcfg-link diff --git a/includes/post/expand-rootfs.ksi b/includes/post/expand-rootfs.ksi index 0114d03..bc309a7 100644 --- a/includes/post/expand-rootfs.ksi +++ b/includes/post/expand-rootfs.ksi @@ -1,16 +1,10 @@ %post set -x -# Setup networking temporarily -[ -f /etc/resolv.conf ] || echo "nameserver 1.1.1.1" > /etc/resolv.conf - # The script that expands root partition [ -d /usr/local/bin ] || mkdir --verbose /usr/local/bin curl 'https://git.thefossguy.com/enterprise-linux/sbc-images/raw/branch/rocky-generic/scripts/expand-rootfs.sh' --output /usr/local/bin/expand-rootfs.sh || exit 1 [ -f /usr/local/bin/expand-rootfs.sh ] && \ chmod --verbose +x /usr/local/bin/expand-rootfs.sh -# Remove the temporary 'resolv.conf' file -rm -v -f /etc/resolv.conf - %end diff --git a/includes/post/post-install.ksi b/includes/post/post-install.ksi index d387836..ad3a521 100644 --- a/includes/post/post-install.ksi +++ b/includes/post/post-install.ksi @@ -1,3 +1,6 @@ +# enable network access in the chroot +[ -f /etc/resolv.conf ] || echo "nameserver 1.1.1.1" > /etc/resolv.conf + %include grub-setup.ksi %include rpm-repos-enable.ksi %include user-setup.ksi diff --git a/includes/post/rpm-repos-enable.ksi b/includes/post/rpm-repos-enable.ksi index be0a325..9ecc439 100644 --- a/includes/post/rpm-repos-enable.ksi +++ b/includes/post/rpm-repos-enable.ksi @@ -4,9 +4,6 @@ set -x MACHINE_ARCH="$(uname -m)" DNF_RELEASEVER="$(dnf config-manager --dump-variables | grep 'releasever' | awk '{print $3}')" -# Setup networking temporarily -[ -f /etc/resolv.conf ] || echo "nameserver 1.1.1.1" > /etc/resolv.conf - # This repository is a given since it provides 'uboot-images-armv8' and # 'uboot-tools', which are **required**. dnf config-manager --assumeyes --add-repo "https://download.rockylinux.org/pub/sig/${DNF_RELEASEVER}/altarch/${MACHINE_ARCH}/altarch-common" @@ -56,7 +53,5 @@ echo 'metadata_expire=2400' | tee -a '/etc/yum.repos.d/_copr:copr.fedorainfraclo dnf clean expire-cache dnf upgrade -y -# Remove the temporary 'resolv.conf' file -rm -v -f /etc/resolv.conf %end