Re: [PATCH] Handle nm-c-e using prefix instead of netmask (#607762)

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

 



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


[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