summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--instdata.py3
-rw-r--r--network.py9
-rw-r--r--yuminstall.py2
3 files changed, 8 insertions, 6 deletions
diff --git a/instdata.py b/instdata.py
index 4c579c919..7e64b06f1 100644
--- a/instdata.py
+++ b/instdata.py
@@ -191,7 +191,8 @@ class InstallData:
except RuntimeError, msg:
log.error("Error running %s: %s", args, msg)
- self.network.write (self.anaconda.rootPath, self.anaconda)
+ self.network.write (instPath=self.anaconda.rootPath,
+ anaconda=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 7bb8b9b9a..c4768ffa1 100644
--- a/network.py
+++ b/network.py
@@ -482,7 +482,7 @@ class Network:
return False
- def write(self, instPath, anaconda):
+ def write(self, instPath='', anaconda=None):
if len(self.netdevices.values()) == 0:
return
@@ -549,9 +549,10 @@ class Network:
# 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")
+ if anaconda is not None:
+ 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 aba368605..5ad0fb9f7 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)
+ anaconda.id.network.write(instPath=anaconda.rootPath, anaconda=anaconda)
anaconda.id.iscsi.write(anaconda.rootPath, anaconda)
anaconda.id.zfcp.write(anaconda.rootPath)
if not anaconda.id.isHeadless: