summaryrefslogtreecommitdiffstats
path: root/instdata.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-09-12 19:52:02 +0000
committerChris Lumens <clumens@redhat.com>2007-09-12 19:52:02 +0000
commita8ead02bdb1c67e6ca3a98eca89a138d7bb4aee9 (patch)
treea743a3cc851f85c9c0471cbe5b159e858c9218f6 /instdata.py
parent9de9024bf29bd29661a8779e1b719c7cfa991a5f (diff)
downloadanaconda-a8ead02bdb1c67e6ca3a98eca89a138d7bb4aee9.tar.gz
anaconda-a8ead02bdb1c67e6ca3a98eca89a138d7bb4aee9.tar.xz
anaconda-a8ead02bdb1c67e6ca3a98eca89a138d7bb4aee9.zip
Write out user and services commands and scripts to anaconda-ks.cfg if doing a
kickstart install.
Diffstat (limited to 'instdata.py')
-rw-r--r--instdata.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/instdata.py b/instdata.py
index 53066edf5..620845425 100644
--- a/instdata.py
+++ b/instdata.py
@@ -252,6 +252,13 @@ class InstallData:
f.write("rootpw %s\n" % args)
+ # Some kickstart commands do not correspond to any anaconda UI
+ # component. If this is a kickstart install, we need to make sure
+ # the information from the input file ends up in the output file.
+ if self.anaconda.isKickstart:
+ f.write(self.ksdata.user.__str__())
+ f.write(self.ksdata.services.__str__())
+
self.firewall.writeKS(f)
if self.auth.strip() != "":
f.write("authconfig %s\n" % self.auth)
@@ -264,6 +271,11 @@ class InstallData:
self.backend.writeKS(f)
self.backend.writePackagesKS(f, self.anaconda)
+ # Also write out any scripts from the input ksfile.
+ if self.anaconda.isKickstart:
+ for s in self.ksdata.scripts:
+ f.write(s.__str__())
+
# make it so only root can read, could have password
os.chmod(filename, 0600)