From 59363df83be00fb798160f318abbbf01267728f6 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Mon, 21 Mar 2022 09:31:28 +0100 Subject: [PATCH] revert setup pgrep change, it doesn't work on itself --- usr/bin/archboot-setup.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr/bin/archboot-setup.sh b/usr/bin/archboot-setup.sh index 2524b3ff7..6d74e36d4 100755 --- a/usr/bin/archboot-setup.sh +++ b/usr/bin/archboot-setup.sh @@ -4788,6 +4788,7 @@ mainmenu() { "7") install_bootloader ;; "8") + [[ -e /tmp/.setup-running ]] && rm /tmp/.setup-running clear echo "" echo "If the install finished successfully, you can now type 'reboot'" @@ -4795,18 +4796,20 @@ mainmenu() { echo "" exit 0 ;; *) - DIALOG --yesno "Abort Installation?" 6 40 && clear && exit 0 + DIALOG --yesno "Abort Installation?" 6 40 && [[ -e /tmp/.setup-running ]] && rm /tmp/.setup-running && clear && exit 0 ;; esac } ##################### ## begin execution ## -if pgrep -f "bash /usr/local/sbin/setup" >/dev/null 2>&1; then +if [[ -e /tmp/.setup-running ]]; then echo "HINT:" - echo "setup already runs on a different tty!" + echo "setup already runs on a different console!" + echo "Please remove /tmp/.setup-running first to launch setup!" exit 1 fi +: >/tmp/.setup-running : >/tmp/.setup set_title