Files
ack-image-builder/scripts/updateDNS.sh
2019-05-29 19:52:07 +08:00

11 lines
326 B
Bash
Executable File

#!/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