summaryrefslogtreecommitdiffstats
path: root/text.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>1999-09-09 00:25:50 +0000
committerMatt Wilson <msw@redhat.com>1999-09-09 00:25:50 +0000
commit1f93c0495eb94877307d16a23038e5954318370c (patch)
tree9c101d234d970dfa1cd46d7e4ca09248ee453603 /text.py
parentd8c74d8ba90b7791526d301eccc8fa458f4aeb91 (diff)
downloadanaconda-1f93c0495eb94877307d16a23038e5954318370c.tar.gz
anaconda-1f93c0495eb94877307d16a23038e5954318370c.tar.xz
anaconda-1f93c0495eb94877307d16a23038e5954318370c.zip
added TurnOnSwapWindow
Diffstat (limited to 'text.py')
-rw-r--r--text.py31
1 files changed, 26 insertions, 5 deletions
diff --git a/text.py b/text.py
index 69f280a90..66d4fdcf4 100644
--- a/text.py
+++ b/text.py
@@ -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,