Re: [PATCH] After setting up our random UUID, inform the storage layer

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

 



On Thu, 2009-03-19 at 19:25 -0400, Jeremy Katz wrote:
> The storage layer keeps track of uuids for filesystems, so we need
> to update it if we change the uuid

This looks good. We should really put this in the common codepath, like
in ActionCreateFormat.execute.

Dave

> ---
>  livecd.py |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/livecd.py b/livecd.py
> index d05dc79..96610cd 100644
> --- a/livecd.py
> +++ b/livecd.py
> @@ -29,6 +29,7 @@ import stat
>  import shutil
>  import time
>  import subprocess
> +import storage
>  
>  import selinux
>  
> @@ -238,6 +239,13 @@ class LiveCDCopyBackend(backend.AnacondaBackend):
>                                 stdout="/dev/tty5",
>                                 stderr="/dev/tty5",
>                                 searchPath = 1)
> +        # and now set the uuid in the storage layer
> +        storage.udev.udev_settle()
> +        rootDevice.updateSysfsPath()
> +        iutil.notify_kernel("/sys%s" %rootDevice.sysfsPath)
> +        info = storage.udev.udev_get_block_device("/sys%s" % rootDevice.sysfsPath)
> +        rootDevice.format.uuid = storage.udev.udev_device_get_uuid(info)
> +        log.info("reset the rootdev (%s) to have a uuid of %s" %(rootDevice.sysfsPath, rootDevice.format.uuid))
>  
>          # for any filesystem that's _not_ on the root, we need to handle
>          # moving the bits from the livecd -> the real filesystems.

_______________________________________________
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