diff --git a/ack-centos.json b/ack-centos.json index 49823e7..e1e9eb3 100644 --- a/ack-centos.json +++ b/ack-centos.json @@ -28,9 +28,10 @@ "scripts/reboot.sh", "scripts/cleanUpKerneles.sh", "config/default.sh", + "scripts/updateDNS.sh", "scripts/verify.sh" ], "expect_disconnect": true } ] -} \ No newline at end of file +} diff --git a/scripts/updateDNS.sh b/scripts/updateDNS.sh new file mode 100755 index 0000000..4d17825 --- /dev/null +++ b/scripts/updateDNS.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# unlock DNS file in case it was locked +# chattr -i /etc/resolv.conf + +# Using your custom nameserver to replace xxx.xxx.xxx.xxx +# echo "nameserver xxx.xxx.xxx.xxx\nnameserver xxx.xxx.xxx.xxx" > /etc/resolv.conf + +# Keep resolv locked to prevent overwriting by cloudinit/NetworkManager +# chattr +i /etc/resolv.conf