Skip to content

Commit 10d2b62

Browse files
authored
Merge pull request #15 from vrozenfe/master
RFC: modify the firstboot script to check the scrips
2 parents 0e9caa1 + b40e534 commit 10d2b62

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

mlcustomize/firstboot.ml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,19 @@ if not exist \"%%scripts_done%%\" (
305305
:: Pick the next script to run.
306306
for %%%%f in (\"%%scripts%%\"\\*.bat) do (
307307
echo running \"%%%%f\"
308-
move \"%%%%f\" \"%%scripts_done%%\"
309-
pushd \"%%scripts_done%%\"
308+
pushd \"%%scripts%%\"
310309
call \"%%%%~nf\"
311310
set elvl=!errorlevel!
312311
echo .... exit code !elvl!
313312
popd
314313
314+
if !elvl! NEQ 249 (
315+
echo Script succeeded, moving to scripts-done
316+
move \"%%%%f\" \"%%scripts_done%%\"
317+
) else (
318+
echo Script failed, will retry on next boot
319+
)
320+
315321
:: Reboot the computer. This is necessary to free any locked
316322
:: files which may prevent later scripts from running.
317323
shutdown /r /t 0 /y

0 commit comments

Comments
 (0)