From b0b4b673eba90c984c1e19e3c4f2ce576c065888 Mon Sep 17 00:00:00 2001 From: Salt Date: Fri, 21 Jun 2019 22:43:59 -0500 Subject: [PATCH] Fix FS_DIEONWM not finding a binary that doesn't exist --- firestarter | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/firestarter b/firestarter index 76fb179..6e92baf 100755 --- a/firestarter +++ b/firestarter @@ -460,20 +460,20 @@ step_postexecute() { } step_wait() { [ -n "$_dryrun" ] && exit 0 - log "Send any termination signal to firestarter to log out" trap step_logout EXIT - if [ -n "$FS_DIEONWM" ] && gettarget "$_configdir/wm" && has readlink; then - target="$_return" + if [ -n "$FS_DIEONWM" ] && gettarget "$_configdir/wm" && has readlink && has "$_return"; then + target="$(command -v "$_return")" for job in $(jobs -p); do if [ "$target" = "$(readlink /proc/$job/exe)" ]; then - log "Waiting for WM to exit" + log "Waiting for WM to exit: \"$_return\"" wait "$job" + exit 0 fi done - else - log "Waiting for programs to exit" - wait + log "Could not find WM: \"$target\"" fi + log "Waiting for programs to exit" + wait exit 0 } step_logout() {