Suppress noisy job control messages and ignore empty menu input
Some checks failed
Test / test (push) Has been cancelled
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:
@@ -620,6 +620,7 @@ start_watchdog() {
|
|||||||
export GDK_BACKEND=x11
|
export GDK_BACKEND=x11
|
||||||
export WEBKIT_DISABLE_DMABUF_RENDERER=1
|
export WEBKIT_DISABLE_DMABUF_RENDERER=1
|
||||||
/opt/cisco/secureclient/bin/vpnui &
|
/opt/cisco/secureclient/bin/vpnui &
|
||||||
|
disown
|
||||||
sleep 3
|
sleep 3
|
||||||
|
|
||||||
# Run auto-login
|
# Run auto-login
|
||||||
@@ -682,6 +683,7 @@ start_anyconnect() {
|
|||||||
export WEBKIT_DISABLE_DMABUF_RENDERER=1
|
export WEBKIT_DISABLE_DMABUF_RENDERER=1
|
||||||
/opt/cisco/secureclient/bin/vpnui &
|
/opt/cisco/secureclient/bin/vpnui &
|
||||||
VPNUI_PID=$!
|
VPNUI_PID=$!
|
||||||
|
disown $VPNUI_PID
|
||||||
log DEBUG "vpnui started with PID $VPNUI_PID"
|
log DEBUG "vpnui started with PID $VPNUI_PID"
|
||||||
|
|
||||||
if [ "$do_auto_login" = "true" ]; then
|
if [ "$do_auto_login" = "true" ]; then
|
||||||
@@ -859,6 +861,9 @@ while true; do
|
|||||||
read -r choice
|
read -r choice
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
# Ignore empty/whitespace input
|
||||||
|
[[ -z "${choice// }" ]] && continue
|
||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
1) if [ "$SKIP_AUTO_LOGIN" = "true" ]; then
|
1) if [ "$SKIP_AUTO_LOGIN" = "true" ]; then
|
||||||
start_anyconnect "false"
|
start_anyconnect "false"
|
||||||
@@ -876,6 +881,6 @@ while true; do
|
|||||||
9) show_hosts ;;
|
9) show_hosts ;;
|
||||||
e|E) edit_hosts ;;
|
e|E) edit_hosts ;;
|
||||||
q|Q) log INFO "Goodbye!"; exit 0 ;;
|
q|Q) log INFO "Goodbye!"; exit 0 ;;
|
||||||
*) log ERROR "Invalid choice" ;;
|
*) ;; # Ignore invalid input silently
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user