Suppress noisy job control messages and ignore empty menu input
Some checks failed
Test / test (push) Has been cancelled

- Add disown after vpnui & to suppress "killed" messages
- Ignore empty/whitespace input in menu loop
- Remove "Invalid choice" error (just ignore silently)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-17 09:38:49 +00:00
parent 7c76016fcf
commit 50cdd3ea1c

View File

@@ -620,6 +620,7 @@ start_watchdog() {
export GDK_BACKEND=x11
export WEBKIT_DISABLE_DMABUF_RENDERER=1
/opt/cisco/secureclient/bin/vpnui &
disown
sleep 3
# Run auto-login
@@ -682,6 +683,7 @@ start_anyconnect() {
export WEBKIT_DISABLE_DMABUF_RENDERER=1
/opt/cisco/secureclient/bin/vpnui &
VPNUI_PID=$!
disown $VPNUI_PID
log DEBUG "vpnui started with PID $VPNUI_PID"
if [ "$do_auto_login" = "true" ]; then
@@ -859,6 +861,9 @@ while true; do
read -r choice
echo ""
# Ignore empty/whitespace input
[[ -z "${choice// }" ]] && continue
case $choice in
1) if [ "$SKIP_AUTO_LOGIN" = "true" ]; then
start_anyconnect "false"
@@ -876,6 +881,6 @@ while true; do
9) show_hosts ;;
e|E) edit_hosts ;;
q|Q) log INFO "Goodbye!"; exit 0 ;;
*) log ERROR "Invalid choice" ;;
*) ;; # Ignore invalid input silently
esac
done