From 8cf2d3d5611fbf252cc0823be623926a36f2baba Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Mon, 19 Jul 2021 18:45:54 +0200 Subject: [PATCH] unlocksim fix Signed-off-by: Stacy Harper --- configs/default_hooks/unlocksim | 2 +- scripts/modem/sxmo_modemmonitor.sh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configs/default_hooks/unlocksim b/configs/default_hooks/unlocksim index 3bb8465..7c925e4 100644 --- a/configs/default_hooks/unlocksim +++ b/configs/default_hooks/unlocksim @@ -2,7 +2,7 @@ # include common definitions # shellcheck source=scripts/core/sxmo_common.sh -. "$(dirname "$0")/sxmo_common.sh" +. "$(which sxmo_common.sh)" modem_n() { MODEMS="$(mmcli -L)" diff --git a/scripts/modem/sxmo_modemmonitor.sh b/scripts/modem/sxmo_modemmonitor.sh index ed694cc..752647a 100755 --- a/scripts/modem/sxmo_modemmonitor.sh +++ b/scripts/modem/sxmo_modemmonitor.sh @@ -286,6 +286,9 @@ mainloop() { pidof unlocksim || sxmo_hooks.sh unlocksim & elif echo "$newstate" | grep "int32 8"; then echo registered > "$MODEMSTATEFILE" + #if there is a PIN entry menu open, kill it: + # shellcheck disable=SC2009 + ps aux | grep dmenu | grep PIN | gawk '{ print $1 }' | xargs kill checkforfinishedcalls checkforincomingcalls checkfornewtexts