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