Update power.sh

This commit is contained in:
Kroese 2024-05-05 16:41:26 +02:00 committed by GitHub
parent 180589858e
commit 5af74a709c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -81,14 +81,13 @@ finish() {
done
fi
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$STORAGE/$BASE" ]; then
if [ ! -f "$STORAGE/windows.boot" ] && [ -f "$BOOT" ]; then
# Remove CD-ROM ISO after install
if ready; then
if rm -f "$STORAGE/$BASE" 2>/dev/null; then
if ready && [[ "$REMOVE" != [Nn]* ]]; then
rm -f "$BOOT" 2>/dev/null || true
touch "$STORAGE/windows.boot"
fi
fi
fi
pid="/var/run/tpm.pid"
[ -s "$pid" ] && pKill "$(<"$pid")"