712866
From e65825117377a8e1e730912aa4c0e786122d892a Mon Sep 17 00:00:00 2001
712866
From: Harald Hoyer <harald@redhat.com>
712866
Date: Fri, 9 Oct 2015 11:35:43 +0200
712866
Subject: [PATCH] network/ifup.sh: skip empty nameserver values
712866
712866
---
712866
 modules.d/40network/ifup.sh | 8 ++++----
712866
 1 file changed, 4 insertions(+), 4 deletions(-)
712866
712866
diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh
5c6c2a
index 0471c425..7c06cd86 100755
712866
--- a/modules.d/40network/ifup.sh
712866
+++ b/modules.d/40network/ifup.sh
712866
@@ -336,8 +336,8 @@ fi
712866
 ip=$(getarg ip)
712866
 
712866
 if [ -z "$ip" ]; then
712866
-    namesrv=$(getargs nameserver)
712866
-    for s in $namesrv; do
712866
+    for s in $(getargs nameserver); do
712866
+        [ -n "$s" ] || continue
712866
         echo nameserver $s >> /tmp/net.$netif.resolv.conf
712866
     done
712866
 
712866
@@ -373,8 +373,8 @@ for p in $(getargs ip=); do
712866
     [ "$use_vlan" != 'true' ] && continue
712866
 
712866
     # setup nameserver
712866
-    namesrv="$dns1 $dns2 $(getargs nameserver)"
712866
-    for s in $namesrv; do
712866
+    for s in "$dns1" "$dns2" $(getargs nameserver); do
712866
+        [ -n "$s" ] || continue
712866
         echo nameserver $s >> /tmp/net.$netif.resolv.conf
712866
     done
712866