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

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



---
 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));
+    }
 }
 
 sub _drivecmp
-- 
1.6.6.1


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