From 2e2f6a64b54450f14ca96608627ab77ff2d97544 Mon Sep 17 00:00:00 2001 From: Salt Date: Mon, 10 Aug 2020 20:39:16 -0500 Subject: [PATCH] Work on making it easier for complex WMs to be a thing --- firestarter | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/firestarter b/firestarter index 957b9e4..1dce433 100755 --- a/firestarter +++ b/firestarter @@ -324,11 +324,12 @@ step_postexecute() { step_wait() { [ -n "$_optdryrun" ] && exit 0 trap step_logout EXIT - if [ -n "$FS_DIEONWM" ] && gettarget "$_optconfigdir/wm" && has readlink "$_return"; then - target="$(command -v "$_return")" + log "Checking for window manager" 2 + if [ -n "$FS_DIEONWM" ] && gettarget "$_optconfigdir/wm"; then + target="$_return" for job in $(jobs -p); do - if [ "$target" = "$(readlink /proc/$job/exe)" ]; then - log "Waiting for WM to exit: \"$_return\"" + if [ "$target" = "$(cat /proc/$job/cmdline)" ]; then + log "Waiting for WM to exit: \"$target\"" wait "$job" exit 0 fi