summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2016-05-26 13:28:18 -0400
committerScott Dodson <sdodson@redhat.com>2016-05-26 13:28:18 -0400
commit643b9b30066f0130f35e9ce7b1a8a7c24a244cc7 (patch)
treee7bd28ef2e30a2366204cf9000d2080f591b889a /roles
parentb5cdb506d814723aa53c1389037d6b641dadb445 (diff)
parent67a822a04bec9aa81c35c7dc11641d219308c3de (diff)
downloadopenshift-643b9b30066f0130f35e9ce7b1a8a7c24a244cc7.tar.gz
openshift-643b9b30066f0130f35e9ce7b1a8a7c24a244cc7.tar.bz2
openshift-643b9b30066f0130f35e9ce7b1a8a7c24a244cc7.tar.xz
openshift-643b9b30066f0130f35e9ce7b1a8a7c24a244cc7.zip
Merge pull request #1952 from sdodson/fix-resolv-conf
Fix resolv conf
Diffstat (limited to 'roles')
-rwxr-xr-xroles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh b/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh
index 0d7941e4c..51a43d113 100755
--- a/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh
+++ b/roles/openshift_node_dnsmasq/files/networkmanager/99-origin-dns.sh
@@ -51,6 +51,9 @@ EOF
done
systemctl restart dnsmasq
- sed -i 's/^nameserver.*$/nameserver '"${def_route_ip}"' # updated by \/etc\/NetworkManager\/dispatcher.d\/99-origin-dns.sh/g' /etc/resolv.conf
+ sed -i 's/^nameserver.*$/nameserver '"${def_route_ip}"'/g' /etc/resolv.conf
+ if ! grep -q '99-origin-dns.sh' /etc/resolv.conf; then
+ echo "# nameserver updated by /etc/NetworkManager/dispatcher.d/99-origin-dns.sh" >> /etc/resolv.conf
+ fi
fi
fi