FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 02-03-2012, 11:57 AM
Radek Vykydal
 
Default 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).
---
loader/net.c | 2 +-
pyanaconda/network.py | 14 --------------
2 files changed, 1 insertions(+), 15 deletions(-)

diff --git a/loader/net.c b/loader/net.c
index d556554..dc11390 100644
--- a/loader/net.c
+++ b/loader/net.c
@@ -1215,7 +1215,7 @@ int writeDisabledIfcfgFile(char *device) {
fprintf(fp, "DEVICE=%s
", device);
fprintf(fp, "HWADDR=%s
", iface_mac2str(device));
fprintf(fp, "ONBOOT=no
");
- fprintf(fp, "NM_CONTROLLED=no
");
+ fprintf(fp, "NM_CONTROLLED=yes
");
/* default for network service, NM assumes it */
fprintf(fp, "BOOTPROTO=dhcp
");

diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index f9d50cf..2cfe5c3 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:
--
1.7.7.5

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 08:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org