diff options
author | Matt Wilson <msw@redhat.com> | 1999-09-09 00:25:50 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 1999-09-09 00:25:50 +0000 |
commit | 1f93c0495eb94877307d16a23038e5954318370c (patch) | |
tree | 9c101d234d970dfa1cd46d7e4ca09248ee453603 /text.py | |
parent | d8c74d8ba90b7791526d301eccc8fa458f4aeb91 (diff) | |
download | anaconda-1f93c0495eb94877307d16a23038e5954318370c.tar.gz anaconda-1f93c0495eb94877307d16a23038e5954318370c.tar.xz anaconda-1f93c0495eb94877307d16a23038e5954318370c.zip |
added TurnOnSwapWindow
Diffstat (limited to 'text.py')
-rw-r--r-- | text.py | 31 |
1 files changed, 26 insertions, 5 deletions
@@ -787,13 +787,32 @@ class PartitionWindow: for partition, mount, fstype, size in todo.ddruid.getFstab (): todo.addMount(partition, mount, fstype) - if iutil.memAvailable() < 14000: - todo.ddruid.save () - todo.makeFilesystems (createFs = 0) - todo.ddruidAlreadySaved = 1 - return dir +class TurnOnSwapWindow: + + beenTurnedOn = 0 + + def __call__(self, screen, todo): + if self.beenTurnedOn or (iutil.memInstalled() > 30000): + 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 + + todo.ddruid.save () + todo.makeFilesystems (createFs = 0) + todo.ddruidAlreadySaved = 1 + self.beenTurnedOn = 1 + + return INSTALL_OK class FormatWindow: def __call__(self, screen, todo): @@ -1615,6 +1634,8 @@ class InstallInterface: (self.screen, todo), "partition" ], [_("Partition"), PartitionWindow, (self.screen, todo), "partition" ], + [_("Swap"), TurnOnSwapWindow, (self.screen, todo), + "partition" ], [_("Filesystem Formatting"), FormatWindow, (self.screen, todo), "format" ], [_("LILO Configuration"), LiloAppendWindow, |