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

[Libguestfs] [PATCH 2/4] Check kudzu exists before attempting to disable it



chkconfig will return an error if kudzu isn't installed, which will cause the
conversion to fail.
---
 lib/Sys/VirtV2V/GuestOS/RedHat.pm |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/Sys/VirtV2V/GuestOS/RedHat.pm b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
index 563e6f1..f04beb3 100644
--- a/lib/Sys/VirtV2V/GuestOS/RedHat.pm
+++ b/lib/Sys/VirtV2V/GuestOS/RedHat.pm
@@ -1789,7 +1789,9 @@ sub prepare_bootable
     #   require manual intervention, or
     #   disable the network interface
     # Neither of these behaviours is desirable.
-    $g->command(['/sbin/chkconfig', 'kudzu', 'off']);
+    if ($g->exists('/etc/init.d/kudzu')) {
+        $g->command(['/sbin/chkconfig', 'kudzu', 'off']);
+    }
 }
 
 =item supports_virtio(kernel)
-- 
1.7.2


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