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:
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
anaconda-devel@lists.stg.fedoraproject.org