From 15500a07f836b15916d29f908eca9973d4a9903d Mon Sep 17 00:00:00 2001 From: Thomas Winkler Date: Tue, 10 Mar 2026 13:40:28 +0100 Subject: [PATCH] openconnect: fix token_script error handling/logging When token_script fails, proto_setup_failed() notifies netifd that setup has failed, but script execution continues regardless. This commit adds exit 1 and sleep 5 (consistent with wireguard.sh error handling) to abort setup on token_script failure. Also fix typo in logger tag ("openconenct" -> "openconnect"). Signed-off-by: Thomas Winkler --- net/openconnect/files/openconnect.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh index 6ec8b66296..2e60fc8b53 100755 --- a/net/openconnect/files/openconnect.sh +++ b/net/openconnect/files/openconnect.sh @@ -149,8 +149,10 @@ proto_openconnect_setup() { } [ "$token_mode" = "script" ] && { $token_script >> "$pwfile" 2> /dev/null || { - logger -t openconenct "Cannot get password from script '$token_script'" + logger -t openconnect "Cannot get password from script '$token_script'" + sleep 5 proto_setup_failed "$config" + exit 1 } } append_args --passwd-on-stdin