Ack.
Hans de Goede wrote:
---
pyanaconda/network.py | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index 15a65f4..2ed9cb1 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -535,8 +535,12 @@ class Network:
else:
f.write(" --bootproto static --ip %s" % dev.get('ipaddr'))
- if dev.get('netmask'):
- f.write(" --netmask %s" % dev.get('netmask'))
+ netmask = dev.get('netmask')
+ prefix = dev.get('prefix')
+ if not netmask and prefix:
+ netmask = isys.prefix2netmask(int(prefix))
+ if netmask:
+ f.write(" --netmask %s" % netmask)
if dev.get('GATEWAY'):
f.write(" --gateway %s" % (dev.get('GATEWAY'),))
@@ -847,8 +851,13 @@ class Network:
else:
hostname = ""
+ netmask = dev.get('netmask')
+ prefix = dev.get('prefix')
+ if not netmask and prefix:
+ netmask = isys.prefix2netmask(int(prefix))
+
netargs += "ip=%s::%s:%s:%s:%s:none" % (dev.get('ipaddr'),
- gateway, dev.get('netmask'), hostname, nic)
+ gateway, netmask, hostname, nic)
hwaddr = dev.get("HWADDR")
if hwaddr:
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list