[Libguestfs] [v2v PATCH 07/12] convert_windows: align "configure_vmdp" batch files with OCaml source

Laszlo Ersek lersek at redhat.com
Tue Mar 8 14:30:54 UTC 2022


Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1788823
Signed-off-by: Laszlo Ersek <lersek at redhat.com>
---
 convert/convert_windows.ml | 32 +++++++++-----------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/convert/convert_windows.ml b/convert/convert_windows.ml
index f1ae0fa8a4b1..56e12cf12ba8 100644
--- a/convert/convert_windows.ml
+++ b/convert/convert_windows.ml
@@ -418,25 +418,21 @@ let convert (g : G.guestfs) _ inspect _ static_ips =
     (* Configure VMDP if possible *)
     g#upload tool_path "/vmdp.exe";
 
-    let fb_script = "\
-echo V2V first boot script started
-echo Decompressing VMDP installer
-\"\\vmdp.exe\"
-pushd \"VMDP-*\"
-echo Installing VMDP
-setup.exe /eula_accepted /no_reboot
-popd
-" in
+    let fb_script = "echo V2V first boot script started\n\
+                     echo Decompressing VMDP installer\n\
+                     \"\\vmdp.exe\"\n\
+                     pushd \"VMDP-*\"\n\
+                     echo Installing VMDP\n\
+                     setup.exe /eula_accepted /no_reboot\n\
+                     popd\n" in
 
-    let fb_recover_script = "\
-echo Finishing VMDP installation
-if not exist VMDP-* (
-  \"\\vmdp.exe\"
-)
-pushd \"VMDP-*\"
-setup.exe /eula_accepted /no_reboot
-popd
-" in
+    let fb_recover_script = "echo Finishing VMDP installation\n\
+                             if not exist VMDP-* (\n\
+                               \"\\vmdp.exe\"\n\
+                             )\n\
+                             pushd \"VMDP-*\"\n\
+                             setup.exe /eula_accepted /no_reboot\n\
+                             popd\n" in
 
     Firstboot.add_firstboot_script g inspect.i_root
       "configure vmdp" fb_script;
-- 
2.19.1.3.g30247aa5d201




More information about the Libguestfs mailing list