diff options
author | Erik Troan <ewt@redhat.com> | 1999-09-01 00:24:43 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-09-01 00:24:43 +0000 |
commit | 3f92666dcb0171105dfc38eff8b31fec2c983e92 (patch) | |
tree | d4bb64bb41c7eeb3fa74c7e473fd22a93c4c788e /installclass.py | |
parent | ddb1c1454012411f2636c59d651be3bd98151692 (diff) | |
download | anaconda-3f92666dcb0171105dfc38eff8b31fec2c983e92.tar.gz anaconda-3f92666dcb0171105dfc38eff8b31fec2c983e92.tar.xz anaconda-3f92666dcb0171105dfc38eff8b31fec2c983e92.zip |
changes to make partitioning work in kickstart
Diffstat (limited to 'installclass.py')
-rw-r--r-- | installclass.py | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/installclass.py b/installclass.py index 125b98cbe..089066ed1 100644 --- a/installclass.py +++ b/installclass.py @@ -6,6 +6,33 @@ class InstallClass: + # ummm, HACK + def finishPartitioning(self, ddruid): + if not self.partitions: return + + attempt = [] + swapCount = 0 + + for (mntpoint, size, maxsize, grow) in self.partitions: + type = 0x83 + if (mntpoint == "swap"): + mntpoint = "Swap%04d-auto" % swapCount + swapCount = swapCount + 1 + type = 0x82 + + attempt.append((mntpoint, size, type, grow, -1)) + + try: + ddruid.attempt (attempt, "Junk Argument", 0) + return 1 + except: + # life's a female dog <shrug> -- we should log something though + # <double-shrug> + self.skipPartitioning = 0 + pass + + return 0 + # look in mouse.py for a list of valid mouse names -- use the LONG names def setMouseType(self, name, device = None, emulateThreeButtons = 0): self.mouse = (name, device, emulateThreeButtons) @@ -31,7 +58,10 @@ class InstallClass: "package-selection", "bootdisk", "partition", "format", "timezone", "accounts", "dependencies", "language", "keyboard", "welcome", "installtype", "mouse" ].index(type) - self.skipSteps[type] = 1 + if type == "partition": + self.skipPartitioning = 1 + else: + self.skipSteps[type] = 1 def setHostname(self, hostname): self.hostname = hostname @@ -90,6 +120,8 @@ class InstallClass: self.netmask = "" self.gateway = "" self.nameserver = "" + self.partitions = [] + self.skipPartitioning = 0 # custom installs are easy :-) class CustomInstall(InstallClass): |