diff options
-rw-r--r-- | installclass.py | 4 | ||||
-rw-r--r-- | kickstart.py | 1 | ||||
-rw-r--r-- | textw/partitioning.py | 19 |
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) |