From 5af74a709c518dd936867e8f007e1e6786c159d3 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 5 May 2024 16:41:26 +0200 Subject: [PATCH] Update power.sh --- src/power.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/power.sh b/src/power.sh index e198610..0ece9bc 100644 --- a/src/power.sh +++ b/src/power.sh @@ -81,12 +81,11 @@ 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" - fi + if ready && [[ "$REMOVE" != [Nn]* ]]; then + rm -f "$BOOT" 2>/dev/null || true + touch "$STORAGE/windows.boot" fi fi