FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Kubuntu User

 
 
LinkBack Thread Tools
 
Old 05-04-2012, 05:47 PM
Will Woods
 
Default dracut parse-kickstart: don't write empty "nameserver="

This can actually cause some problems because "getarg nameserver" will
return "1" for the argument "nameserver=", which means you end up with
DNS1=1 in your ifcfg, which is obviously wrong.
---
dracut/parse-kickstart | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
index 0c81108..aa4e0e8 100755
--- a/dracut/parse-kickstart
+++ b/dracut/parse-kickstart
@@ -189,7 +189,8 @@ def ksnet_to_dracut(args, lineno, net, bootdev=False):
line.append("ip=%s" % ip)

for ns in net.nameserver.split(","):
- line.append("nameserver=%s" % ns)
+ if ns:
+ line.append("nameserver=%s" % ns)

if net.mtu:
# XXX FIXME: dracut doesn't support mtu= (yet)
--
1.7.7.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 05-04-2012, 06:39 PM
"Brian C. Lane"
 
Default dracut parse-kickstart: don't write empty "nameserver="

On Fri, May 04, 2012 at 01:47:27PM -0400, Will Woods wrote:
> This can actually cause some problems because "getarg nameserver" will
> return "1" for the argument "nameserver=", which means you end up with
> DNS1=1 in your ifcfg, which is obviously wrong.
> ---
> dracut/parse-kickstart | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
> index 0c81108..aa4e0e8 100755
> --- a/dracut/parse-kickstart
> +++ b/dracut/parse-kickstart
> @@ -189,7 +189,8 @@ def ksnet_to_dracut(args, lineno, net, bootdev=False):
> line.append("ip=%s" % ip)
>
> for ns in net.nameserver.split(","):
> - line.append("nameserver=%s" % ns)
> + if ns:
> + line.append("nameserver=%s" % ns)
>
> if net.mtu:
> # XXX FIXME: dracut doesn't support mtu= (yet)
> --
> 1.7.7.6

Ack

--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 12:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org