[PATCH 3/4] Test NM_CONTROLLED setting correctly in network.py (#502466)

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

 



The only value we care about for NM_CONTROLLED is 'no', so change test
to work that way.  If performing a livecd install, make sure to carry
over any NM_CONTROLLED settings in the ifcfg-* files on the live CD.
Users with custom live images may have that set, so we should preserve
it.
---
 network.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/network.py b/network.py
index e3ce2c1..7cfb399 100644
--- a/network.py
+++ b/network.py
@@ -248,7 +248,8 @@ class NetworkDevice(SimpleConfigFile):
             keys.remove("KEY")
 
         for key in keys:
-            if key in ("NM_CONTROLLED", "NAME"):
+            if (key == 'NAME') or \
+               (key == 'NM_CONTROLLED' and not flags.livecdInstall):
                 continue
             # make sure we include autoneg in the ethtool line
             elif key == 'ETHTOOL_OPTS' and self.info[key].find("autoneg")== -1:
@@ -283,9 +284,9 @@ class Network:
             # NetworkManager first, then fill in the gaps with the data
             # from the ifcfg file
             useNetworkManager = False
-            if ifcfg_contents.has_key('NM_CONTROLLED'):
-                if ifcfg_contents['NM_CONTROLLED'].lower() == 'yes' or ifcfg_contents['NM_CONTROLLED'] == '':
-                    useNetworkManager = True
+            if ifcfg_contents.has_key('NM_CONTROLLED') and \
+               not ifcfg_contents['NM_CONTROLLED'].lower() == 'no':
+                useNetworkManager = True
 
             # this interface is managed by NetworkManager, so read from
             # NetworkManager first
-- 
1.6.2.2

_______________________________________________
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