diff options
author | Hans de Goede <hans@localhost.localdomain> | 2008-10-24 22:36:14 +0200 |
---|---|---|
committer | Hans de Goede <hans@localhost.localdomain> | 2008-10-24 22:39:48 +0200 |
commit | 351f18092f98f319d2203377ab141c070cc00a72 (patch) | |
tree | 4e1f109f116ca5f3535e093aedf116e25e1dcc34 | |
parent | 56188b8c165e9ff4b0d90b549c35d1143f44380e (diff) | |
download | anaconda-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.
-rw-r--r-- | instdata.py | 2 | ||||
-rw-r--r-- | network.py | 10 | ||||
-rw-r--r-- | yuminstall.py | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/instdata.py b/instdata.py index fc8f0f3d4..4c579c919 100644 --- a/instdata.py +++ b/instdata.py @@ -191,7 +191,7 @@ class InstallData: except RuntimeError, msg: log.error("Error running %s: %s", args, msg) - self.network.write (self.anaconda.rootPath) + self.network.write (self.anaconda.rootPath, self.anaconda) self.firewall.write (self.anaconda.rootPath) self.security.write (self.anaconda.rootPath) self.desktop.write(self.anaconda.rootPath) 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) diff --git a/yuminstall.py b/yuminstall.py index 1a6dbdfa4..aba368605 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -1461,7 +1461,7 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon if os.access("/etc/modprobe.d/anaconda", os.R_OK): shutil.copyfile("/etc/modprobe.d/anaconda", anaconda.rootPath + "/etc/modprobe.d/anaconda") - anaconda.id.network.write(anaconda.rootPath) + anaconda.id.network.write(anaconda.rootPath, anaconda) anaconda.id.iscsi.write(anaconda.rootPath, anaconda) anaconda.id.zfcp.write(anaconda.rootPath) if not anaconda.id.isHeadless: |