From a4a19bc8a640ff1326cf00de3321dc5cfc0ce2a4 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 May 2024 21:49:09 +0200 Subject: [PATCH] Update power.sh --- src/power.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/power.sh b/src/power.sh index 4ee80a4..f68b70f 100644 --- a/src/power.sh +++ b/src/power.sh @@ -71,11 +71,12 @@ 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 - touch "$STORAGE/windows.boot" + touch "$STORAGE/windows.boot" + if [[ "$REMOVE" != [Nn]* ]]; then + rm -f "$BOOT" 2>/dev/null || true fi fi fi