|
|
712866 |
From 942d60d8afad4eb8b131a33fe9618e3e8392d33f Mon Sep 17 00:00:00 2001
|
|
|
712866 |
From: Harald Hoyer <harald@redhat.com>
|
|
|
712866 |
Date: Tue, 18 Aug 2015 12:40:01 +0200
|
|
|
712866 |
Subject: [PATCH] network/net-lib.sh:ibft unset gateway or dns, if set to
|
|
|
712866 |
0.0.0.0
|
|
|
712866 |
|
|
|
712866 |
---
|
|
|
712866 |
modules.d/40network/net-lib.sh | 3 +++
|
|
|
712866 |
1 file changed, 3 insertions(+)
|
|
|
712866 |
|
|
|
712866 |
diff --git a/modules.d/40network/net-lib.sh b/modules.d/40network/net-lib.sh
|
|
|
5c6c2a |
index 44c1bf04..c8203567 100755
|
|
|
712866 |
--- a/modules.d/40network/net-lib.sh
|
|
|
712866 |
+++ b/modules.d/40network/net-lib.sh
|
|
|
712866 |
@@ -236,9 +236,12 @@ ibft_to_cmdline() {
|
|
|
712866 |
# skip not assigned ip adresses
|
|
|
712866 |
[ "$ip" = "0.0.0.0" ] && continue
|
|
|
712866 |
[ -e ${iface}/gateway ] && gw=$(read a < ${iface}/gateway; echo $a)
|
|
|
712866 |
+ [ "$gateway" = "0.0.0.0" ] && unset $gateway
|
|
|
712866 |
[ -e ${iface}/subnet-mask ] && mask=$(read a < ${iface}/subnet-mask; echo $a)
|
|
|
712866 |
[ -e ${iface}/primary-dns ] && dns1=$(read a < ${iface}/primary-dns; echo $a)
|
|
|
712866 |
+ [ "$dns1" = "0.0.0.0" ] && unset $dns1
|
|
|
712866 |
[ -e ${iface}/secondary-dns ] && dns2=$(read a < ${iface}/secondary-dns; echo $a)
|
|
|
712866 |
+ [ "$dns2" = "0.0.0.0" ] && unset $dns2
|
|
|
712866 |
[ -e ${iface}/hostname ] && hostname=$(read a < ${iface}/hostname; echo $a)
|
|
|
712866 |
if [ -n "$ip" ] && [ -n "$mask" ]; then
|
|
|
712866 |
echo "ip=$ip::$gw:$mask:$hostname:$dev:none${dns1:+:$dns1}${dns2:+:$dns2}"
|