From 0e5c38bdb052d270fd8f3c07040adcea408d1d86 Mon Sep 17 00:00:00 2001 From: Graham R Pugh Date: Wed, 10 Mar 2021 12:00:42 +0100 Subject: [PATCH] check_power is optional --- erase-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erase-install.sh b/erase-install.sh index 04474bb..43af4b5 100755 --- a/erase-install.sh +++ b/erase-install.sh @@ -816,7 +816,7 @@ do --test-run) test_run="yes" ;; --check-power) - wait_for_power="yes" + check_power="yes" ;; --power-wait-limit) shift @@ -935,7 +935,7 @@ os_minor_version=$( echo "$os_version" | sed 's|^10\.||' | sed 's|\..*||' ) # check for power and drive space if invoking erase or reinstall options if [[ $erase == "yes" || $reinstall == "yes" ]]; then free_space_check - check_power_status + [[ "$check_power" == "yes" ]] && check_power_status fi # Look for the installer, download it if it is not present