Blame SOURCES/0357-network-ifup.sh-skip-empty-nameserver-values.patch

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