[PATCH 2/2] Add support for swap --hibernation on LVM
Vratislav Podzimek
vpodzime at redhat.com
Fri Aug 17 12:27:20 UTC 2012
We support swap --hibernation on standard partition, but expected
behaviour is that it will work also on LVM.
Resolves: rhbz#848818
---
iutil.py | 6 +++---
kickstart.py | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/iutil.py b/iutil.py
index fd54dde..3e3f903 100644
--- a/iutil.py
+++ b/iutil.py
@@ -473,15 +473,15 @@ def swapSuggestion(quiet=0, hibernation=False):
else:
swap = 4096
- if not quiet:
- log.info("Swap attempt of %sM", swap)
-
if hibernation:
if mem <= 65536:
swap = mem + swap
else:
log.info("Ignoring --hibernation option on systems with 64 GB of RAM or more")
+ if not quiet:
+ log.info("Swap attempt of %sM", swap)
+
#we have to return minimum and maximum swap size
return (swap, swap)
diff --git a/kickstart.py b/kickstart.py
index eafaac3..045453c 100644
--- a/kickstart.py
+++ b/kickstart.py
@@ -465,7 +465,7 @@ class Lang(commands.lang.FC3_Lang):
anaconda.id.instLanguage.systemLang = self.lang
anaconda.id.ksdata.skipSteps.append("language")
-class LogVolData(commands.logvol.F12_LogVolData):
+class LogVolData(commands.logvol.RHEL6_LogVolData):
def execute(self, anaconda):
storage = anaconda.id.storage
devicetree = storage.devicetree
@@ -475,8 +475,8 @@ class LogVolData(commands.logvol.F12_LogVolData):
if self.mountpoint == "swap":
type = "swap"
self.mountpoint = ""
- if self.recommended:
- (self.size, self.maxSizeMB) = iutil.swapSuggestion()
+ if self.recommended or self.hibernation:
+ (self.size, self.maxSizeMB) = iutil.swapSuggestion(hibernation=self.hibernation)
self.grow = True
else:
if self.fstype != "":
--
1.7.11.2
More information about the anaconda-patches
mailing list