Patch series regenerated from public sources: - https://github.com/libguestfs/virt-v2v (branch rhel-10.2) - https://github.com/libguestfs/libguestfs-common (branch rhel-10.2-virt-v2v)
123 lines
6.2 KiB
Diff
123 lines
6.2 KiB
Diff
From bd5e315f274994bd0a537631ad80a1bcf2911647 Mon Sep 17 00:00:00 2001
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
Date: Tue, 5 May 2026 12:40:49 +0100
|
|
Subject: [PATCH] common: update submodule
|
|
|
|
Richard W.M. Jones (1):
|
|
mlcustomize: Update generated files
|
|
|
|
Srihari Parimi (1):
|
|
mlcustomize: firstboot.bat must not reboot VM on error code 250
|
|
|
|
(cherry picked from commit 463d0bbd471bc49df7dfb37231a468bfb0510fdc)
|
|
---
|
|
common | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
Submodule common 31d0d6d4..763a2102:
|
|
diff --git a/common/mlcustomize/customize-options.pod b/common/mlcustomize/customize-options.pod
|
|
index c8de3953..95767cc7 100644
|
|
--- a/common/mlcustomize/customize-options.pod
|
|
+++ b/common/mlcustomize/customize-options.pod
|
|
@@ -161,10 +161,7 @@ conveniently wraps the command up in a single line script for you.
|
|
You can have multiple I<--firstboot> options. They run in the same
|
|
order that they appear on the command line.
|
|
|
|
-Please take a look at L<virt-builder(1)/FIRST BOOT SCRIPTS> for more
|
|
-information and caveats about the first boot scripts.
|
|
-
|
|
-See also I<--run>.
|
|
+See also: L<virt-customize(1)/FIRSTBOOT>, I<--run>.
|
|
|
|
=item B<--firstboot-command> 'CMD+ARGS'
|
|
|
|
@@ -174,10 +171,7 @@ boots up (as root, late in the boot process).
|
|
You can have multiple I<--firstboot> options. They run in the same
|
|
order that they appear on the command line.
|
|
|
|
-Please take a look at L<virt-builder(1)/FIRST BOOT SCRIPTS> for more
|
|
-information and caveats about the first boot scripts.
|
|
-
|
|
-See also I<--run>.
|
|
+See also: L<virt-customize(1)/FIRSTBOOT>, I<--run>.
|
|
|
|
=item B<--firstboot-install> PKG,PKG..
|
|
|
|
diff --git a/common/mlcustomize/customize_cmdline.ml b/common/mlcustomize/customize_cmdline.ml
|
|
index 786f4ee4..b8eda519 100644
|
|
--- a/common/mlcustomize/customize_cmdline.ml
|
|
+++ b/common/mlcustomize/customize_cmdline.ml
|
|
@@ -252,13 +252,13 @@ let rec argspec ?(v2v = false) () =
|
|
Getopt.String (s_"SCRIPT", fun s -> List.push_front (`FirstbootScript s) ops),
|
|
s_"Run script at first guest boot"
|
|
),
|
|
- Some "SCRIPT", "Install C<SCRIPT> inside the guest, so that when the guest first boots\nup, the script runs (as root, late in the boot process).\n\nThe script is automatically chmod +x after installation in the guest.\n\nThe alternative version I<--firstboot-command> is the same, but it\nconveniently wraps the command up in a single line script for you.\n\nYou can have multiple I<--firstboot> options. They run in the same\norder that they appear on the command line.\n\nPlease take a look at L<virt-builder(1)/FIRST BOOT SCRIPTS> for more\ninformation and caveats about the first boot scripts.\n\nSee also I<--run>.", false;
|
|
+ Some "SCRIPT", "Install C<SCRIPT> inside the guest, so that when the guest first boots\nup, the script runs (as root, late in the boot process).\n\nThe script is automatically chmod +x after installation in the guest.\n\nThe alternative version I<--firstboot-command> is the same, but it\nconveniently wraps the command up in a single line script for you.\n\nYou can have multiple I<--firstboot> options. They run in the same\norder that they appear on the command line.\n\nSee also: L<virt-customize(1)/FIRSTBOOT>, I<--run>.", false;
|
|
(
|
|
[ L"firstboot-command" ],
|
|
Getopt.String (s_"'CMD+ARGS'", fun s -> List.push_front (`FirstbootCommand s) ops),
|
|
s_"Run command at first guest boot"
|
|
),
|
|
- Some "'CMD+ARGS'", "Run command (and arguments) inside the guest when the guest first\nboots up (as root, late in the boot process).\n\nYou can have multiple I<--firstboot> options. They run in the same\norder that they appear on the command line.\n\nPlease take a look at L<virt-builder(1)/FIRST BOOT SCRIPTS> for more\ninformation and caveats about the first boot scripts.\n\nSee also I<--run>.", false;
|
|
+ Some "'CMD+ARGS'", "Run command (and arguments) inside the guest when the guest first\nboots up (as root, late in the boot process).\n\nYou can have multiple I<--firstboot> options. They run in the same\norder that they appear on the command line.\n\nSee also: L<virt-customize(1)/FIRSTBOOT>, I<--run>.", false;
|
|
(
|
|
[ L"firstboot-install" ],
|
|
Getopt.String (
|
|
diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml
|
|
index 5e23a64b..fc3b7a69 100644
|
|
--- a/common/mlcustomize/firstboot.ml
|
|
+++ b/common/mlcustomize/firstboot.ml
|
|
@@ -320,13 +320,18 @@ for %%%%f in ("%%scripts%%"\*.bat) do (
|
|
echo Script failed, will retry on next boot
|
|
)
|
|
|
|
- :: Reboot the computer. This is necessary to free any locked
|
|
- :: files which may prevent later scripts from running.
|
|
- shutdown /r /t 0 /y
|
|
+ :: Reboot the computer only if exit code indicates.
|
|
+ :: Exit code 250 means do not reboot, otherwise reboot
|
|
+ :: Reboot is necessary to free any locked files which
|
|
+ :: may prevent later scripts from running.
|
|
+ if !elvl! NEQ 250 (
|
|
+ shutdown /r /t 0 /y
|
|
|
|
- :: Exit the script (in case shutdown returns before rebooting).
|
|
- :: On next boot, the whole firstboot service will be called again.
|
|
- exit /b
|
|
+ :: Exit the script (in case shutdown returns before rebooting).
|
|
+ :: On next boot, the whole firstboot service will be called again.
|
|
+
|
|
+ exit /b
|
|
+ )
|
|
)
|
|
|
|
:: Fallthrough here if there are no scripts.
|
|
diff --git a/common/mlcustomize/v2v-customize-options.pod b/common/mlcustomize/v2v-customize-options.pod
|
|
index f02f05da..6252ffe9 100644
|
|
--- a/common/mlcustomize/v2v-customize-options.pod
|
|
+++ b/common/mlcustomize/v2v-customize-options.pod
|
|
@@ -161,10 +161,7 @@ conveniently wraps the command up in a single line script for you.
|
|
You can have multiple I<--firstboot> options. They run in the same
|
|
order that they appear on the command line.
|
|
|
|
-Please take a look at L<virt-builder(1)/FIRST BOOT SCRIPTS> for more
|
|
-information and caveats about the first boot scripts.
|
|
-
|
|
-See also I<--run>.
|
|
+See also: L<virt-customize(1)/FIRSTBOOT>, I<--run>.
|
|
|
|
=item B<--firstboot-command> 'CMD+ARGS'
|
|
|
|
@@ -174,10 +171,7 @@ boots up (as root, late in the boot process).
|
|
You can have multiple I<--firstboot> options. They run in the same
|
|
order that they appear on the command line.
|
|
|
|
-Please take a look at L<virt-builder(1)/FIRST BOOT SCRIPTS> for more
|
|
-information and caveats about the first boot scripts.
|
|
-
|
|
-See also I<--run>.
|
|
+See also: L<virt-customize(1)/FIRSTBOOT>, I<--run>.
|
|
|
|
=item B<--firstboot-install> PKG,PKG..
|
|
|