44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From 0a3e2281c04fa4bffeaac1a2fd4c5a8234c2e1ab Mon Sep 17 00:00:00 2001
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
Date: Fri, 1 May 2026 16:35:25 +0100
|
|
Subject: [PATCH] common: update submodule
|
|
|
|
Srihari Parimi (1):
|
|
mlcustomize: firstboot.bat must not reboot VM on error code 250
|
|
|
|
(cherry picked from commit a4bc0acf3707b14bcaee237a3c9a7f8f5dd13ff9)
|
|
---
|
|
common | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
Submodule common cf2e12078..228449739:
|
|
diff --git a/common/mlcustomize/firstboot.ml b/common/mlcustomize/firstboot.ml
|
|
index 543e98fb1..366beca9e 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.
|