summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Troan <ewt@redhat.com>1999-09-25 16:04:19 +0000
committerErik Troan <ewt@redhat.com>1999-09-25 16:04:19 +0000
commit5e7b6c3ad227c32f9ed2856f9bcedfb4364d96c9 (patch)
treebfb45b6d9fac81d76d5329f3cea58d7ad66f3742
parent511e952c13be64335b253e64eeedc7f76f7a8818 (diff)
downloadanaconda-5e7b6c3ad227c32f9ed2856f9bcedfb4364d96c9.tar.gz
anaconda-5e7b6c3ad227c32f9ed2856f9bcedfb4364d96c9.tar.xz
anaconda-5e7b6c3ad227c32f9ed2856f9bcedfb4364d96c9.zip
added earlySwap for kickstart
-rw-r--r--installclass.py4
-rw-r--r--kickstart.py1
-rw-r--r--textw/partitioning.py19
3 files changed, 15 insertions, 9 deletions
diff --git a/installclass.py b/installclass.py
index ad169ee04..b750db555 100644
--- a/installclass.py
+++ b/installclass.py
@@ -167,6 +167,9 @@ class InstallClass:
return (self.bootProto, self.ip, self.netmask, self.gateway,
self.nameserver)
+ def setEarlySwapOn(self, state = 0):
+ self.earlySwapOn = state
+
def setLanguage(self, lang):
self.language = lang
@@ -208,6 +211,7 @@ class InstallClass:
self.postScript = None
self.postInChroot = 0
self.fstab = []
+ self.earlySwapOn = 0
# we need to be able to differentiate between this and custom
class DefaultInstall(InstallClass):
diff --git a/kickstart.py b/kickstart.py
index 863029122..b5b581c41 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -333,6 +333,7 @@ class Kickstart(InstallClass):
self.addToSkipList("welcome")
self.addToSkipList("package-selection")
self.addToSkipList("confirm-install")
+ self.setEarlySwapOn(1)
self.partitions = []
self.installType = "install"
diff --git a/textw/partitioning.py b/textw/partitioning.py
index 834e2d23f..ccea03e48 100644
--- a/textw/partitioning.py
+++ b/textw/partitioning.py
@@ -154,15 +154,16 @@ class TurnOnSwapWindow:
if self.beenTurnedOn or (iutil.memInstalled() > 34000):
return INSTALL_NOOP
- rc = ButtonChoiceWindow(screen, _("Low Memory"),
- _("As you don't have much memory in this machine, we "
- "need to turn on swap space immediately. To do this "
- "we'll have to write your new partition table to the "
- "disk immediately. Is that okay?"),
- [ (_("Yes"), "yes"), (_("No"), "back") ], width = 50)
-
- if (rc == "back"):
- return INSTALL_BACK
+ if not todo.instClass.earlySwapOn:
+ rc = ButtonChoiceWindow(screen, _("Low Memory"),
+ _("As you don't have much memory in this machine, we "
+ "need to turn on swap space immediately. To do this "
+ "we'll have to write your new partition table to the "
+ "disk immediately. Is that okay?"),
+ [ (_("Yes"), "yes"), (_("No"), "back") ], width = 50)
+
+ if (rc == "back"):
+ return INSTALL_BACK
todo.ddruid.save ()
todo.makeFilesystems (createFs = 0)