diff options
author | David Cantrell <dcantrell@redhat.com> | 2009-05-28 11:08:51 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2009-06-02 10:11:20 -1000 |
commit | 6104124defc97a4f65d31c1cc5c09e0716f6f3c1 (patch) | |
tree | 37227291aad8b0c11e210e5ce2a3a4b6a2115aff /network.py | |
parent | 02edd45fa1fd9176c02d63100eef03d6ab91cd79 (diff) | |
download | anaconda-6104124defc97a4f65d31c1cc5c09e0716f6f3c1.tar.gz anaconda-6104124defc97a4f65d31c1cc5c09e0716f6f3c1.tar.xz anaconda-6104124defc97a4f65d31c1cc5c09e0716f6f3c1.zip |
Test NM_CONTROLLED setting correctly in network.py (#502466)
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.
Diffstat (limited to 'network.py')
-rw-r--r-- | network.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/network.py b/network.py index e3ce2c169..7cfb39966 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 |