summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node/files/networkmanager
diff options
context:
space:
mode:
Diffstat (limited to 'roles/openshift_node/files/networkmanager')
-rwxr-xr-xroles/openshift_node/files/networkmanager/99-origin-dns.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/roles/openshift_node/files/networkmanager/99-origin-dns.sh b/roles/openshift_node/files/networkmanager/99-origin-dns.sh
index 16129a288..8c597a65b 100755
--- a/roles/openshift_node/files/networkmanager/99-origin-dns.sh
+++ b/roles/openshift_node/files/networkmanager/99-origin-dns.sh
@@ -60,7 +60,8 @@ if [[ $2 =~ ^(up|dhcp4-change|dhcp6-change)$ ]]; then
def_routes_int=$(for r in ${def_routes}; do /sbin/ip route get to ${r} | awk '{print $3}'; done)
interfaces="${def_route_int} ${def_routes_int}"
- if [[ "${interfaces}" =~ (^|[[:space:]])${DEVICE_IFACE}($|[[:space:]]) ]]; then
+ nsconf=$(grep -P ^nameserver /etc/resolv.conf | wc -l)
+ if [[ $nsconf -gt 0 && "${interfaces}" =~ (^|[[:space:]])${DEVICE_IFACE}($|[[:space:]]) ]]; then
# if [[ ${DEVICE_IFACE} == ${def_route_int} ]]; then
if [ ! -f /etc/dnsmasq.d/origin-dns.conf ]; then
cat << EOF > /etc/dnsmasq.d/origin-dns.conf