From: Thomas Winkler Date: Tue, 10 Mar 2026 12:40:28 +0000 (+0100) Subject: openconnect: fix token_script error handling/logging X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=15500a07f836b15916d29f908eca9973d4a9903d;p=openwrt-packages.git 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 --- diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh index 6ec8b6629..2e60fc8b5 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