[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH 3/4] Test NM_CONTROLLED setting correctly in network.py (#502466)
- From: David Cantrell <dcantrell redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH 3/4] Test NM_CONTROLLED setting correctly in network.py (#502466)
- Date: Mon, 1 Jun 2009 17:51:45 -1000
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
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]