summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2012-02-03 12:26:48 +0100
committerRadek Vykydal <rvykydal@redhat.com>2012-02-03 13:51:17 +0100
commitf84767f4bace8cdefec23378e487f3c9c7a0a089 (patch)
tree39ce454760c06887ca1f9c4add9a81221a109f9c
parent16e19c9827c0edcb0c2e5f3896eedfe9b9cf5170 (diff)
downloadanaconda-f84767f4bace8cdefec23378e487f3c9c7a0a089.tar.gz
anaconda-f84767f4bace8cdefec23378e487f3c9c7a0a089.tar.xz
anaconda-f84767f4bace8cdefec23378e487f3c9c7a0a089.zip
Network spoke: set NM_CONTROLLED to yes in initial files
So that we can control them with the spoke. We used to do it when initializing network object in stage 2 because of subtleties of network storage devices handling. It seems we can do it already when writing initial ifcfg files (loader/dracut).
-rw-r--r--loader/net.c2
-rw-r--r--pyanaconda/network.py14
2 files changed, 1 insertions, 15 deletions
diff --git a/loader/net.c b/loader/net.c
index d556554f8..dc113906c 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -1215,7 +1215,7 @@ int writeDisabledIfcfgFile(char *device) {
fprintf(fp, "DEVICE=%s\n", device);
fprintf(fp, "HWADDR=%s\n", iface_mac2str(device));
fprintf(fp, "ONBOOT=no\n");
- fprintf(fp, "NM_CONTROLLED=no\n");
+ fprintf(fp, "NM_CONTROLLED=yes\n");
/* default for network service, NM assumes it */
fprintf(fp, "BOOTPROTO=dhcp\n");
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index f9d50cf70..2cfe5c33f 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -396,12 +396,6 @@ class Network:
self.update()
- # Set all devices to be controlled by NM by default.
- # We can filter out storage devices only after
- # we have device tree populated. So we do it before
- # running nm-c-e and before writing ifcfg files to system.
- self.setNMControlledDevices(self.netdevices.keys())
-
def update(self):
ifcfglog.debug("Network.update() called")
@@ -551,14 +545,6 @@ class Network:
device.writeIfcfgFile()
# devices == None => set for all
- def setNMControlledDevices(self, devices=None):
- for devname, device in self.netdevices.items():
- if devices and devname not in devices:
- device.set(('NM_CONTROLLED', 'no'))
- else:
- device.set(('NM_CONTROLLED', 'yes'))
-
- # devices == None => set for all
def updateActiveDevices(self, devices=None):
for devname, device in self.netdevices.items():
if devices and devname not in devices: