fix: Support read-only images

This commit is contained in:
Kroese 2024-04-27 11:57:17 +02:00 committed by GitHub
parent 629db7e4a6
commit 66b82f139f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,10 +68,11 @@ finish() {
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$STORAGE/$BASE" ]; then
# Remove CD-ROM ISO after install
if ready; then
rm -f "$STORAGE/$BASE"
if rm -f "$STORAGE/$BASE" 2>/dev/null; then
touch "$STORAGE/windows.boot"
fi
fi
fi
pid="/var/run/tpm.pid"
[ -s "$pid" ] && pKill "$(<"$pid")"