Re: [PATCH] Clean up vg name generator and default to "vg_image" in image installs.

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

 



On Thu, 2011-02-17 at 12:22 -0600, David Lehman wrote:
> ---
>  pyanaconda/storage/__init__.py |   16 ++++++----------
>  1 files changed, 6 insertions(+), 10 deletions(-)
> 
> diff --git a/pyanaconda/storage/__init__.py b/pyanaconda/storage/__init__.py
> index 0309f28..ddac09c 100644
> --- a/pyanaconda/storage/__init__.py
> +++ b/pyanaconda/storage/__init__.py
> @@ -936,19 +936,15 @@ class Storage(object):
>      def createSuggestedVGName(self, hostname=None):
>          """ Return a reasonable, unused VG name. """
>          # try to create a volume group name incorporating the hostname
> -        vgnames = [vg.name for vg in self.vgs]
> -        if hostname is not None and hostname != '':
> -            if hostname == 'localhost' or hostname == 'localhost.localdomain':
> -                vgtemplate = "VolGroup"
> -            elif hostname.find('.') != -1:
> -                template = "vg_%s" % (hostname.split('.')[0].lower(),)
> -                vgtemplate = safeLvmName(template)
> -            else:
> -                template = "vg_%s" % (hostname.lower(),)
> -                vgtemplate = safeLvmName(template)
> +        if hostname not in (None, "", 'localhost', 'localhost.localdomain'):
> +            template = "vg_%s" % (hostname.split('.')[0].lower(),)
> +            vgtemplate = safeLvmName(template)
> +        elif flags.imageInstall:
> +            vgtemplate = "vg_image"
>          else:
>              vgtemplate = "VolGroup"
>  
> +        vgnames = [vg.name for vg in self.vgs]
>          if vgtemplate not in vgnames and \
>                  vgtemplate not in lvm.lvm_vg_blacklist:
>              return vgtemplate

Looks to preserve the same behavior. Ack. 

-w

_______________________________________________
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