[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] Fix handling of swap files. (#496529)
- From: David Lehman <dlehman redhat com>
- To: anaconda-devel-list redhat com
- Cc:
- Subject: [PATCH] Fix handling of swap files. (#496529)
- Date: Fri, 24 Apr 2009 14:07:13 -0500
We have to try as late as possible to identify the device that contains
the swap file to maximize the chances that the filesystem will be
mounted when we go to look for it.
---
storage/__init__.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/storage/__init__.py b/storage/__init__.py
index 519ac98..48a6690 100644
--- a/storage/__init__.py
+++ b/storage/__init__.py
@@ -1481,6 +1481,17 @@ class FSSet(object):
def turnOnSwap(self, anaconda, upgrading=None):
for device in self.swapDevices:
+ if isinstance(device, FileDevice):
+ # set up FileDevices' parents now that they are accessible
+ targetDir = "%s/%s" % (anaconda.rootPath, device.path)
+ parent = get_containing_device(targetDir, self.devicetree)
+ if not parent:
+ log.error("cannot determine which device contains "
+ "directory %s" % device.path)
+ device.parents = []
+ else:
+ device.parents = [parent]
+
try:
device.setup()
device.format.setup()
--
1.6.0.6
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]