feat: Check if IP is specified (#1135)

This commit is contained in:
Kroese 2025-03-19 09:45:08 +01:00 committed by GitHub
parent e5e71f67fa
commit 522d646fa3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View file

@ -628,7 +628,9 @@ updateXML() {
local language="$2"
local culture region user admin pass keyboard
sed -i "s/ 20.20.20.1 / ${VM_NET_IP%.*}.1 /g" "$asset"
if [ -n "${VM_NET_IP:-}" ]; then
sed -i "s/ 20.20.20.1 / ${VM_NET_IP%.*}.1 /g" "$asset"
fi
[ -z "$HEIGHT" ] && HEIGHT="720"
[ -z "$WIDTH" ] && WIDTH="1280"