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

Re: [Libguestfs] [PATCH] GuestOS: Delete blkid.tab if it's present



On Tue, May 11, 2010 at 06:15:22PM +0100, Matthew Booth wrote:
> ---
>  lib/Sys/VirtV2V/GuestOS/RedHat.pm |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/Sys/VirtV2V/GuestOS/RedHat.pm b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
> index 7c41ff6..ba37001 100644
> --- a/lib/Sys/VirtV2V/GuestOS/RedHat.pm
> +++ b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
> @@ -1132,6 +1132,11 @@ sub remap_block_devices
>          $g->aug_set($spec, "/dev/".$map{$name}.$part);
>      }
>      $g->aug_save();
> +
> +    # Delete cached (and now out of date) blkid info if it exists
> +    foreach my $blkidtab ('/etc/blkid/blkid.tab', '/etc/blkid.tab') {
> +        $g->rm($blkidtab) if ($g->exists($blkidtab));
> +    }

ACK.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html


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