Re: [PATCH rhel7-alpha2-branch] dracut: fix parse-kickstart traceback with 'network' command (#824842)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 31, 2012 at 12:15:53PM -0400, Will Woods wrote:
> str.join() takes a single list argument. It won't take a list of
> arguments. Grr.
> 
> Also, fix some goofiness with empty items (sometimes they're None and
> sometimes they're "")
> ---
>  dracut/parse-kickstart |   12 +++++++++---
>  1 file changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart
> index 9baece0..12c9f8b 100755
> --- a/dracut/parse-kickstart
> +++ b/dracut/parse-kickstart
> @@ -180,11 +180,17 @@ def ksnet_to_dracut(args, lineno, net, bootdev=False):
>  
>      if ":" in net.gateway:
>          net.gateway = "[%s]" % net.gateway
> +    if net.ipv6 and not net.ip:
> +        ip = "[%s]" % net.ipv6
> +    else:
> +        ip = net.ip
>  
> -    ip=":".join(net.ip or "[%s]" % net.ipv6, "", net.gateway, net.netmask,
> -                net.hostname, net.device, net.autoconf, net.mtu)
> +    iplist = [ip, "", net.gateway, net.netmask,
> +              net.hostname, net.device, net.autoconf]
> +    if net.mtu:
> +        iplist.append(net.mtu)
>  
> -    line.append("ip=%s" % ip)
> +    line.append("ip=" + ":".join(i or "" for i in iplist))
>  
>      for ns in net.nameserver.split(","):
>          if ns:
> -- 
> 1.7.10.2

Ack

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)

Attachment: pgpdhTyiBx1Z3.pgp
Description: PGP signature

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux