--- pyanaconda/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py index ab01c6f..8edeab0 100644 --- a/pyanaconda/network.py +++ b/pyanaconda/network.py @@ -658,7 +658,7 @@ def kickstartNetworkData(ifcfg=None, hostname=None): ifcfg.get('IPV6INIT') == "no"): kwargs["noipv6"] = True else: - if ifcfg.get('IPV6_AUTOCONF') == "yes": + if ifcfg.get('IPV6_AUTOCONF') in ("yes", ""): kwargs["ipv6"] = "auto" else: if ifcfg.get('IPV6ADDR'):
Ack.
----- Original Message -----
pyanaconda/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py index ab01c6f..8edeab0 100644 --- a/pyanaconda/network.py +++ b/pyanaconda/network.py @@ -658,7 +658,7 @@ def kickstartNetworkData(ifcfg=None, hostname=None): ifcfg.get('IPV6INIT') == "no"): kwargs["noipv6"] = True else:
if ifcfg.get('IPV6_AUTOCONF') == "yes":
if ifcfg.get('IPV6_AUTOCONF') in ("yes", ""): kwargs["ipv6"] = "auto" else: if ifcfg.get('IPV6ADDR'):
-- 1.7.11.7
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
--- dracut/parse-kickstart | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart index b88eba7..afca075 100755 --- a/dracut/parse-kickstart +++ b/dracut/parse-kickstart @@ -291,12 +291,14 @@ def ksnet_to_ifcfg(net, filename=None): else: ifcfg['IPV6INIT'] = "yes"
- if net.ipv6 == 'dhcp': - ifcfg['DHCPV6C'] = "yes" - elif net.ipv6 == 'auto': - ifcfg['IPV6_AUTOCONF'] = "yes" # NOTE: redundant (this is the default) - elif ':' in net.ipv6: - ifcfg['IPV6ADDR'] = net.ipv6 + if net.ipv6 == 'dhcp': + ifcfg['DHCPV6C'] = "yes" + ifcfg['IPV6_AUTOCONF'] = "no" + elif net.ipv6 == 'auto': + ifcfg['IPV6_AUTOCONF'] = "yes" # NOTE: redundant (this is the default) + elif ':' in net.ipv6: + ifcfg['IPV6ADDR'] = net.ipv6 + ifcfg['IPV6_AUTOCONF'] = "no"
# misc stuff if net.mtu:
Ack.
----- Original Message -----
dracut/parse-kickstart | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/dracut/parse-kickstart b/dracut/parse-kickstart index b88eba7..afca075 100755 --- a/dracut/parse-kickstart +++ b/dracut/parse-kickstart @@ -291,12 +291,14 @@ def ksnet_to_ifcfg(net, filename=None): else: ifcfg['IPV6INIT'] = "yes"
- if net.ipv6 == 'dhcp':
ifcfg['DHCPV6C'] = "yes"
- elif net.ipv6 == 'auto':
ifcfg['IPV6_AUTOCONF'] = "yes" # NOTE: redundant (this is
the default)
- elif ':' in net.ipv6:
ifcfg['IPV6ADDR'] = net.ipv6
if net.ipv6 == 'dhcp':
ifcfg['DHCPV6C'] = "yes"
ifcfg['IPV6_AUTOCONF'] = "no"
elif net.ipv6 == 'auto':
ifcfg['IPV6_AUTOCONF'] = "yes" # NOTE: redundant (this
is the default)
elif ':' in net.ipv6:
ifcfg['IPV6ADDR'] = net.ipv6
ifcfg['IPV6_AUTOCONF'] = "no"
# misc stuff if net.mtu:
-- 1.7.11.7
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
We might read the configuration from NM instead of ifcfg in future but some pieces are still missing. --- pyanaconda/network.py | 11 +++++++++++ 1 file changed, 11 insertions(+)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py index 8edeab0..c1e7626 100644 --- a/pyanaconda/network.py +++ b/pyanaconda/network.py @@ -652,6 +652,17 @@ def kickstartNetworkData(ifcfg=None, hostname=None): # note that --gateway is common for ipv4 and ipv6 if ifcfg.get('GATEWAY'): kwargs["gateway"] = ifcfg.get('GATEWAY') + elif ifcfg.get('IPADDR0'): + kwargs["bootProto"] = "static" + kwargs["ip"] = ifcfg.get('IPADDR0') + prefix = ifcfg.get('PREFIX0') + if prefix: + netmask = isys.prefix2netmask(int(prefix)) + kwargs["netmask"] = netmask + # note that --gateway is common for ipv4 and ipv6 + if ifcfg.get('GATEWAY0'): + kwargs["gateway"] = ifcfg.get('GATEWAY0') +
# ipv6 if (not ifcfg.get('IPV6INIT') or
--- pyanaconda/ui/gui/spokes/network.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py index 622e724..0a98666 100644 --- a/pyanaconda/ui/gui/spokes/network.py +++ b/pyanaconda/ui/gui/spokes/network.py @@ -1173,7 +1173,11 @@ def getKSNetworkData(device): if ifcfg_suffix: ifcfg_suffix = ifcfg_suffix.replace(' ', '_') device_cfg = NetworkDevice(netscriptsDir, ifcfg_suffix) - device_cfg.loadIfcfgFile() + try: + device_cfg.loadIfcfgFile() + except IOError as e: + log.debug("getKSNetworkData %s: %s" % (ifcfg_suffix, e)) + return retval retval = kickstartNetworkData(ifcfg=device_cfg) if device.get_iface() in getActiveNetDevs(): retval.activate = True
Ack. But return None (the value of retval when in the exception handler) would probably be more readable.
----- Original Message -----
pyanaconda/ui/gui/spokes/network.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py index 622e724..0a98666 100644 --- a/pyanaconda/ui/gui/spokes/network.py +++ b/pyanaconda/ui/gui/spokes/network.py @@ -1173,7 +1173,11 @@ def getKSNetworkData(device): if ifcfg_suffix: ifcfg_suffix = ifcfg_suffix.replace(' ', '_') device_cfg = NetworkDevice(netscriptsDir, ifcfg_suffix)
device_cfg.loadIfcfgFile()
try:
device_cfg.loadIfcfgFile()
except IOError as e:
log.debug("getKSNetworkData %s: %s" % (ifcfg_suffix, e))
return retval retval = kickstartNetworkData(ifcfg=device_cfg) if device.get_iface() in getActiveNetDevs(): retval.activate = True
-- 1.7.11.7
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
--- pyanaconda/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py index c1e7626..294f937 100644 --- a/pyanaconda/network.py +++ b/pyanaconda/network.py @@ -676,7 +676,7 @@ def kickstartNetworkData(ifcfg=None, hostname=None): kwargs["ipv6"] = ifcfg.get('IPV6ADDR') if ifcfg.get('IPV6_DEFAULTGW'): kwargs["gateway"] = ifcfg.get('IPV6_DEFAULTGW') - if ifcfg.get('DHCPV6') == "yes": + if ifcfg.get('DHCPV6C') == "yes": kwargs["ipv6"] = "dhcp"
# ipv4 and ipv6
Ack.
----- Original Message -----
pyanaconda/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py index c1e7626..294f937 100644 --- a/pyanaconda/network.py +++ b/pyanaconda/network.py @@ -676,7 +676,7 @@ def kickstartNetworkData(ifcfg=None, hostname=None): kwargs["ipv6"] = ifcfg.get('IPV6ADDR') if ifcfg.get('IPV6_DEFAULTGW'): kwargs["gateway"] = ifcfg.get('IPV6_DEFAULTGW')
if ifcfg.get('DHCPV6') == "yes":
if ifcfg.get('DHCPV6C') == "yes": kwargs["ipv6"] = "dhcp"
# ipv4 and ipv6
-- 1.7.11.7
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
anaconda-patches@lists.fedorahosted.org