summaryrefslogtreecommitdiffstats
path: root/network.py
diff options
context:
space:
mode:
authorHans de Goede <hans@localhost.localdomain>2008-10-24 22:36:14 +0200
committerHans de Goede <hans@localhost.localdomain>2008-10-24 22:39:48 +0200
commit351f18092f98f319d2203377ab141c070cc00a72 (patch)
tree4e1f109f116ca5f3535e093aedf116e25e1dcc34 /network.py
parent56188b8c165e9ff4b0d90b549c35d1143f44380e (diff)
downloadanaconda-351f18092f98f319d2203377ab141c070cc00a72.tar.gz
anaconda-351f18092f98f319d2203377ab141c070cc00a72.tar.xz
anaconda-351f18092f98f319d2203377ab141c070cc00a72.zip
Tell NetworkManager not to touch network interfaces when / is a netfs
Tell NetworkManager not to touch anaconda configured interfaces when / is on a network based device.
Diffstat (limited to 'network.py')
-rw-r--r--network.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/network.py b/network.py
index d902c3524..7bb8b9b9a 100644
--- a/network.py
+++ b/network.py
@@ -482,7 +482,7 @@ class Network:
return False
- def write(self, instPath=''):
+ def write(self, instPath, anaconda):
if len(self.netdevices.values()) == 0:
return
@@ -545,6 +545,14 @@ class Network:
searchLine = string.joinfields(self.domains, ' ')
f.write("SEARCH=\"%s\"\n" % (searchLine,))
+ # tell NetworkManager not to touch any interfaces used during
+ # installation when / is on a network device. Ideally we would only
+ # tell NM not to touch the interface(s) actually used for /, but we
+ # have no logic to determine that
+ rootdev = anaconda.id.fsset.getEntryByMountPoint("/").device
+ if rootdev.isNetdev():
+ f.write("NM_CONTROLLED=no\n")
+
f.close()
os.chmod(newifcfg, 0644)