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

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