While at it, embed the comment about ERROR_SUCCESS_REBOOT_REQUIRED being
fine into the batch file.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1788823
Signed-off-by: Laszlo Ersek <[email protected]>
---
 convert/convert_windows.ml | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/convert/convert_windows.ml b/convert/convert_windows.ml
index 0611bf06cb80..fa2eae28a768 100644
--- a/convert/convert_windows.ml
+++ b/convert/convert_windows.ml
@@ -512,15 +512,14 @@ let convert (g : G.guestfs) _ inspect _ static_ips =
   and unconfigure_vmwaretools () =
     List.iter (
       fun uninst ->
-        let fb_script = "\
-@echo off
-
-echo uninstalling VMware Tools
-" ^ uninst ^
-(* ERROR_SUCCESS_REBOOT_REQUIRED == 3010 is OK too *)
-"
-if errorlevel 3010 exit /b 0
-" in
+        let fb_script = sprintf
+                          "@echo off\n\
+                           \n\
+                           echo uninstalling VMware Tools\n\
+                           rem ERROR_SUCCESS_REBOOT_REQUIRED (3010) is OK 
too\n\
+                           %s\n\
+                           if errorlevel 3010 exit /b 0\n"
+                          uninst in
 
         Firstboot.add_firstboot_script g inspect.i_root
           "uninstall VMware Tools" fb_script
-- 
2.19.1.3.g30247aa5d201


_______________________________________________
Libguestfs mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to