Merge "Fix unbound on rax centos6 nodes."

This commit is contained in:
Jenkins 2014-08-22 20:26:39 +00:00 committed by Gerrit Code Review
commit 9b7b249fc9
1 changed files with 6 additions and 1 deletions

View File

@ -86,9 +86,14 @@ fi
# Overwrite /etc/resolv.conf at boot
sudo dd of=/etc/rc.local <<EOF
#!/bin/bash
set -e
set -o xtrace
# Some providers inject dynamic network config statically. Work around this
# for DNS nameservers. This is expected to fail on some nodes so remove -e.
set +e
sed -i -e 's/^\(DNS[0-9]*=[.0-9]\+\)/#\1/g' /etc/sysconfig/network-scripts/ifcfg-*
set -e
echo 'nameserver 127.0.0.1' > /etc/resolv.conf
exit 0