[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 5/5] Add --same-as-ram kickstart option for swap size specification



Resolves: rhbz#744129
---
 kickstart.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/kickstart.py b/kickstart.py
index de2dbe9..1e39b11 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -703,7 +703,7 @@ class DmRaid(commands.dmraid.FC6_DmRaid):
     def parse(self, args):
         raise NotImplementedError("The dmraid kickstart command is not currently supported")
 
-class PartitionData(commands.partition.F12_PartData):
+class PartitionData(commands.partition.RHEL6_PartData):
     def execute(self, anaconda):
         storage = anaconda.id.storage
         devicetree = storage.devicetree
@@ -726,6 +726,10 @@ class PartitionData(commands.partition.F12_PartData):
             if self.recommended:
                 (self.size, self.maxSizeMB) = iutil.swapSuggestion()
                 self.grow = True
+
+            if self.sameAsRam:
+                (self.size, self.maxSizeMB) = iutil.swapSameAsRam()
+                self.grow = False
         # if people want to specify no mountpoint for some reason, let them
         # this is really needed for pSeries boot partitions :(
         elif self.mountpoint == "None":
-- 
1.7.4.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]