Re: [rhel6-branch] Fix the autogenerated kickstart (#738580)

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

 



Ack.

On Tue, Feb 14, 2012 at 05:21:59PM +0100, Martin Gracik wrote:
> When using encrypted partitions, the autogenerated kickstart
> had a wrong argument order resulting in kickstart errors.
> ---
>  storage/devices.py |   19 +++++++++++++++++++
>  1 files changed, 19 insertions(+), 0 deletions(-)
> 
> diff --git a/storage/devices.py b/storage/devices.py
> index 0450ceb..dde9269 100644
> --- a/storage/devices.py
> +++ b/storage/devices.py
> @@ -1702,12 +1702,31 @@ class LUKSDevice(DMCryptDevice):
>                                 uuid=None, exists=exists)
>  
>      def writeKS(self, f, preexisting=False, noformat=False, s=None):
> +        # XXX This is a bad hack, but there's no better alternative.
> +        # The self.format here is a filesystem object, and returns
> +        # the mountpoint. The self.slave.format is a LUKS object,
> +        # which just returns "--encrypted". We need to swith these two
> +        # because the mountpoint should go after the ks command, like
> +        # part or raid, and not at the end.
> +        # Changing just the order of the writeKS methods does not help,
> +        # because we need to get the mountpoint *inside* the string.
> +        __self_format = self._format
> +        __slave_format = self.slave._format
> +
> +        # exchange format devices
> +        self._format = __slave_format
> +        self.slave._format = __self_format
> +
>          self.slave.writeKS(f, preexisting=preexisting, noformat=noformat, s=s)
>          f.write(" ")
>          self.format.writeKS(f)
>          if s:
>              f.write(" %s" % s)
>  
> +        # restore format devices
> +        self._format = __self_format
> +        self.slave._format = __slave_format
> +
>      @property
>      def size(self):
>          if not self.exists or not self.partedDevice:
> -- 
> 1.7.5.4
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

-- 
David Cantrell <dcantrell@xxxxxxxxxx>
Supervisor, Installer Engineering Team
Red Hat, Inc. | Westford, MA | EST5EDT

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux