summaryrefslogtreecommitdiffstats
path: root/instdata.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2007-09-04 15:22:09 +0000
committerChris Lumens <clumens@redhat.com>2007-09-04 15:22:09 +0000
commit68f837317eb7ca1f71687a75380f8f0e9eba6c76 (patch)
tree484314c2083872c629fba9a531f3bbef2fcab07f /instdata.py
parentb6e7d9015d1a5fec9d9dc87e844f88f8a54fcb12 (diff)
downloadanaconda-68f837317eb7ca1f71687a75380f8f0e9eba6c76.tar.gz
anaconda-68f837317eb7ca1f71687a75380f8f0e9eba6c76.tar.xz
anaconda-68f837317eb7ca1f71687a75380f8f0e9eba6c76.zip
If we did a kickstart install, use the %packages section from the ks file
instead of creating a new one.
Diffstat (limited to 'instdata.py')
-rw-r--r--instdata.py35
1 files changed, 18 insertions, 17 deletions
diff --git a/instdata.py b/instdata.py
index 045e7f9f3..53066edf5 100644
--- a/instdata.py
+++ b/instdata.py
@@ -45,7 +45,7 @@ log = logging.getLogger("anaconda")
class InstallData:
- def reset(self, anaconda):
+ def reset(self):
# Reset everything except:
#
# - The mouse
@@ -67,14 +67,14 @@ class InstallData:
self.upgrade = None
# XXX move fsset and/or diskset into Partitions object?
self.fsset.reset()
- self.diskset = partedUtils.DiskSet(anaconda)
+ self.diskset = partedUtils.DiskSet(self.anaconda)
self.partitions = partitions.Partitions()
self.bootloader = bootloader.getBootloader()
self.upgradeRoot = None
self.rootParts = None
self.upgradeSwapInfo = None
- if rhpl.getArch() == "s390" or anaconda.isKickstart:
+ if rhpl.getArch() == "s390" or self.anaconda.isKickstart:
self.firstboot = FIRSTBOOT_SKIP
else:
self.firstboot = FIRSTBOOT_DEFAULT
@@ -127,18 +127,18 @@ class InstallData:
def setUpgrade (self, bool):
self.upgrade = bool
- def write(self, anaconda):
+ def write(self):
if self.auth.find("--enablemd5"):
useMD5 = True
else:
useMD5 = False
- self.instLanguage.write (anaconda.rootPath)
+ self.instLanguage.write (self.anaconda.rootPath)
if not self.isHeadless:
- self.keyboard.write (anaconda.rootPath)
+ self.keyboard.write (self.anaconda.rootPath)
- self.timezone.write (anaconda.rootPath)
+ self.timezone.write (self.anaconda.rootPath)
args = ["--update", "--nostart"] + shlex.split(self.auth)
@@ -146,15 +146,15 @@ class InstallData:
if not flags.test:
iutil.execWithRedirect("/usr/sbin/authconfig", args,
stdout = None, stderr = None,
- root = anaconda.rootPath)
+ root = self.anaconda.rootPath)
else:
log.error("Would have run: %s", args)
except RuntimeError, msg:
log.error("Error running %s: %s", args, msg)
- self.network.write (anaconda.rootPath)
- self.firewall.write (anaconda.rootPath)
- self.security.write (anaconda.rootPath)
+ self.network.write (self.anaconda.rootPath)
+ self.firewall.write (self.anaconda.rootPath)
+ self.security.write (self.anaconda.rootPath)
self.users = users.Users()
@@ -163,24 +163,24 @@ class InstallData:
self.rootPassword["isCrypted"], useMD5,
self.rootPassword["lock"])
- if anaconda.isKickstart:
+ if self.anaconda.isKickstart:
for svc in self.ksdata.services.disabled:
iutil.execWithRedirect("/sbin/chkconfig",
[svc, "off"],
stdout="/dev/tty5", stderr="/dev/tty5",
- root=anaconda.rootPath)
+ root=self.anaconda.rootPath)
for svc in self.ksdata.services.enabled:
iutil.execWithRedirect("/sbin/chkconfig",
[svc, "on"],
stdout="/dev/tty5", stderr="/dev/tty5",
- root=anaconda.rootPath)
+ root=self.anaconda.rootPath)
for ud in self.ksdata.user.userList:
if self.users.createUser(ud.name, ud.password, ud.isCrypted,
ud.groups, ud.homedir, ud.shell,
ud.uid, ud.lock,
- root=anaconda.rootPath) == None:
+ root=self.anaconda.rootPath) == None:
log.error("User %s already exists, not creating." % ud.name)
@@ -262,7 +262,7 @@ class InstallData:
if self.backend is not None:
self.backend.writeKS(f)
- self.backend.writePackagesKS(f)
+ self.backend.writePackagesKS(f, self.anaconda)
# make it so only root can read, could have password
os.chmod(filename, 0600)
@@ -274,6 +274,7 @@ class InstallData:
self.instLanguage = language.Language(self.displayMode)
self.keyboard = keyboard.Keyboard()
self.backend = backend
+ self.anaconda = anaconda
self.mouse = None
self.monitor = None
@@ -285,4 +286,4 @@ class InstallData:
self.fsset = fsset.FileSystemSet()
self.methodstr = methodstr
- self.reset(anaconda)
+ self.reset()