From a4713b86b05cc0ee7906c7acc81b3d717d1303ca Mon Sep 17 00:00:00 2001 From: Pratham Patel Date: Sat, 29 Jul 2023 13:27:37 +0530 Subject: [PATCH] setup networking nicely --- includes/post-install.ksi | 3 +++ includes/pre-install.ksi | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/post-install.ksi b/includes/post-install.ksi index 7fc27b0..18a9fa9 100644 --- a/includes/post-install.ksi +++ b/includes/post-install.ksi @@ -2,6 +2,9 @@ %post +# 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.resf.org/thefossguy/rocky-linux-generic-images/raw/branch/r9/scripts/expand-rootfs.sh' --output /usr/local/bin/expand-rootfs.sh diff --git a/includes/pre-install.ksi b/includes/pre-install.ksi index a36cf15..69cbce9 100644 --- a/includes/pre-install.ksi +++ b/includes/pre-install.ksi @@ -1,6 +1,6 @@ %pre # Setup networking temporarily -echo "nameserver 1.1.1.1" > /etc/resolv.conf +[ -f /etc/resolv.conf ] || echo "nameserver 1.1.1.1" > /etc/resolv.conf %end