Laszlo Ersek
2022-Mar-08 14:30 UTC
[Libguestfs] [v2v PATCH 10/12] convert_windows: align "unconfigure_vmwaretools" batch file with OCaml src
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 <lersek at redhat.com> --- 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 = "\ - at 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
Richard W.M. Jones
2022-Mar-08 16:12 UTC
[Libguestfs] [v2v PATCH 10/12] convert_windows: align "unconfigure_vmwaretools" batch file with OCaml src
I couldn't spot any errors in the refactoring, so ACK 1-10. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org