mirror of
https://github.com/openwrt/packages.git
synced 2026-04-15 10:51:55 +00:00
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 <tewinkler86@gmail.com>
This commit is contained in:
committed by
Nikos Mavrogiannopoulos
parent
638335582a
commit
15500a07f8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user