mirror of
https://github.com/dockur/windows.git
synced 2025-10-29 20:25:49 +00:00
feat: automatically execute /storage/shared/FirstLogonCommands/install.bat
This commit is contained in:
parent
80ae80ae10
commit
57704f2fc0
2 changed files with 18 additions and 0 deletions
|
|
@ -1191,6 +1191,15 @@ bootWindows() {
|
|||
return 0
|
||||
}
|
||||
|
||||
prepareCloudInit() {
|
||||
local dir="$1"
|
||||
|
||||
if [ -f "$STORAGE/shared/FirstLogonCommands/install.bat" ]; then
|
||||
# install.bat may depends files in the FirstLogonCommands
|
||||
cp -r "$STORAGE/shared/FirstLogonCommands" "$dir/FirstLogonCommands"
|
||||
fi
|
||||
}
|
||||
|
||||
######################################
|
||||
|
||||
if ! startInstall; then
|
||||
|
|
@ -1231,6 +1240,10 @@ if ! rm -f "$ISO" 2> /dev/null; then
|
|||
rm -f "$ISO"
|
||||
fi
|
||||
|
||||
if ! prepareCloudInit "$DIR"; then
|
||||
exit 60
|
||||
fi
|
||||
|
||||
if ! buildImage "$DIR"; then
|
||||
exit 65
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue