[prev in list] [next in list] [prev in thread] [next in thread]
List: initramfs
Subject: [PATCH] ifcfg: write DNS1=... for nameserver= args (RHBZ#815369)
From: Will Woods <wwoods () redhat ! com>
Date: 2012-04-24 16:24:21
Message-ID: 1335284661-32102-1-git-send-email-wwoods () redhat ! com
[Download RAW message or body]
If you're using a static network config, you'll want to keep your
nameservers around when NM starts. Write DNS1 (and DNS2, DNS3, etc..)
into the ifcfg file.
Thanks to Mark Hamzy <hamzy@us.ibm.com> for the patch.
---
modules.d/45ifcfg/write-ifcfg.sh | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index c072a13..4b7bd3b 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -40,6 +40,11 @@ for netif in $IFACES ; do
echo "UUID=$uuid"
[ -n "$macaddr" ] && echo "MACADDR=$macaddr"
[ -n "$mtu" ] && echo "MTU=$mtu"
+ i=1
+ for ns in $(getargs nameserver); do
+ echo DNS$i=$ns
+ i=$((i+1))
+ done
if [ -f /tmp/net.$netif.lease ]; then
strstr "$ip" '*:*:*' &&
echo "DHCPV6C=yes"
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic