All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ifcfg: write DNS1=... for nameserver= args (RHBZ#815369)
@ 2012-04-23 20:25 Will Woods
       [not found] ` <1335212725-20178-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Will Woods @ 2012-04-23 20:25 UTC (permalink / raw)
  To: initramfs-u79uwXL29TY76Z2rM5mHXA

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-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> for the patch.
---
 modules.d/45ifcfg/write-ifcfg.sh |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/modules.d/45ifcfg/write-ifcfg.sh b/modules.d/45ifcfg/write-ifcfg.sh
index c072a13..3e1d89b 100755
--- a/modules.d/45ifcfg/write-ifcfg.sh
+++ b/modules.d/45ifcfg/write-ifcfg.sh
@@ -53,6 +53,14 @@ for netif in $IFACES ; do
             echo "NETMASK=$mask"
             [ -n "$gw" ] && echo "GATEWAY=$gw"
         fi
+        namesrv=$(getargs nameserver)
+        if [ -n "$namesrv" ]; then
+            i=1
+            for n in $namesrv; do
+                echo DNS$i=$n
+                i=$(($i+1))
+            done
+        fi
     } > /tmp/ifcfg/ifcfg-$netif
 
     # bridge needs different things written to ifcfg
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-04-24 16:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-23 20:25 [PATCH] ifcfg: write DNS1=... for nameserver= args (RHBZ#815369) Will Woods
     [not found] ` <1335212725-20178-1-git-send-email-wwoods-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-04-24 10:45   ` Harald Hoyer
     [not found]     ` <4F968443.8020403-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-04-24 16:23       ` Will Woods
2012-04-24 16:24       ` Will Woods

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.