From ca0b87ea7875d8e829a8cb5cebbf4c485722e66d Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Tue, 4 Jan 2022 18:39:25 -0300 Subject: [PATCH] Use SIGINT to stop loop in chekForGraph...() --- install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index e99dfe9..cf463b8 100755 --- a/install.sh +++ b/install.sh @@ -447,14 +447,17 @@ getDotfiles() { } checkForGraphicalInterface() { - calcHeightAndRun "whiptail --infobox \"Waiting for archiso to finish its tasks (reflector and graphical interface). This may take a while, please wait.\" HEIGTH 61" + trap 'systemctl stop reflector; forceExit=true' INT + calcHeightAndRun "whiptail --infobox \"Waiting for systemd units to finish ('reflector.service'). This may take a while, please wait.\" HEIGTH 61" journalctl --sync result=$(journalctl -b -q -r -g "Graphical" | wc -l) - while [ $result -lt 2 ]; do + forceExit=false + while [ $result -lt 2 ] && [ $forceExit = false ]; do sleep 1 journalctl --sync result=$(journalctl -b -q -r -g "Graphical" | wc -l) done + trap - INT } steps=(