Re: [PATCH 2/4] Do not write LV uuid to grub.conf, but the filesystem uuid

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

 



I do not really like the generic except clause. Can you add the exception type we are supposed to ignore here?
Otherwise it is ok.

Martin

----- "Hans de Goede" <hdegoede@xxxxxxxxxx> wrote:

> When re-using an existing LV for /, and thus one which has uuid set
> in
> its representing Device, we would write the LV uuid to grub.conf as
> root= parameter, resulting in a non booting system.
> 
> Also we no longer keep labels anywhere, so don't look for a label.
> 
> Note that we are only hitting this with pre-existing LV's because we
> are not setting / updating the LVDevice's uuid when creating a new
> one
> (something which we ought to fix).
> ---
>  booty/bootloaderInfo.py |   12 +++++-------
>  1 files changed, 5 insertions(+), 7 deletions(-)
> 
> diff --git a/booty/bootloaderInfo.py b/booty/bootloaderInfo.py
> index 0c1ec5b..90073e2 100644
> --- a/booty/bootloaderInfo.py
> +++ b/booty/bootloaderInfo.py
> @@ -89,14 +89,12 @@ def getRootDevName(initrd, rootDevice):
>          return rootDevice.path
>  
>      try:
> -        if rootDevice.uuid:
> -            return "UUID=%s" % rootDevice.uuid
> -        elif rootDevice.label:
> -            return "LABEL=%s" % rootDevice.label
> -
> -        return rootDevice.path
> +        if rootDevice.format.uuid:
> +            return "UUID=%s" % rootDevice.format.uuid
>      except:
> -        return rootDevice.path
> +        pass
> +
> +    return rootDevice.path
>  
>  class KernelArguments:
>  
> -- 
> 1.6.1.3
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

_______________________________________________
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