[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [PATCH] Fix up swap unmount logic (#708966)
- From: David Lehman <dlehman redhat com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Subject: Re: [PATCH] Fix up swap unmount logic (#708966)
- Date: Fri, 03 Jun 2011 12:07:23 -0500
On Fri, 2011-06-03 at 09:32 -0700, Brian C. Lane wrote:
> swap was always being unmounted, even when swapoff == False
Ack. I have the exact same patch in my local tree.
> ---
> pyanaconda/storage/__init__.py | 5 +++--
> 1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
> index 9904581..b183471 100644
> --- a/pyanaconda/storage/__init__.py
> +++ b/pyanaconda/storage/__init__.py
> @@ -2149,14 +2149,15 @@ class FSSet(object):
> self.active = True
>
> def umountFilesystems(self, ignoreErrors=True, swapoff=True):
> + """ unmount filesystems, except swap if swapoff == False """
> devices = self.mountpoints.values() + self.swapDevices
> devices.extend([self.dev, self.devshm, self.devpts, self.sysfs,
> self.proc, self.usb, self.selinux])
> devices.sort(key=lambda d: getattr(d.format, "mountpoint", None))
> devices.reverse()
> for device in devices:
> - if not device.format.mountable and \
> - (device.format.type != "swap" or swapoff):
> + if (not device.format.mountable) or \
> + (device.format.type == "swap" and not swapoff):
> continue
>
> device.format.teardown()
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]