diff --git a/modules/openstack_project/files/nodepool/scripts/prepare_node.sh b/modules/openstack_project/files/nodepool/scripts/prepare_node.sh index 90e5c4dd32..edd91cb3d7 100755 --- a/modules/openstack_project/files/nodepool/scripts/prepare_node.sh +++ b/modules/openstack_project/files/nodepool/scripts/prepare_node.sh @@ -60,6 +60,18 @@ if [ -x /sbin/restorecon ] ; then sudo chcon system_u:object_r:named_conf_t:s0 /etc/unbound/forwarding.conf fi +# Overwrite /etc/resolv.conf at boot +sudo dd of=/etc/rc.local < /etc/resolv.conf +chattr +i /etc/resolv.conf + +exit 0 +EOF + sudo bash -c "echo 'include: /etc/unbound/forwarding.conf' >> /etc/unbound/unbound.conf" if [ -e /etc/init.d/unbound ] ; then sudo /etc/init.d/unbound restart