From: Rui Salvaterra Date: Tue, 31 May 2022 08:06:49 +0000 (+0100) Subject: openconnect: avoid using the --juniper switch X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=a85bda72cce7ff638c2931e0f11e852995d84835;p=openwrt-packages.git openconnect: avoid using the --juniper switch The --juniper switch has been deprecated in favour of --protocol=nc. Fix the proto script thusly, while keeping compatibility with existing configurations. Note that, as far as UCI is concerned, if both options juniper and vpn_protocol are specified, the latter takes precedence. Signed-off-by: Rui Salvaterra --- diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh index 58e44be93..e80cf969e 100755 --- a/net/openconnect/files/openconnect.sh +++ b/net/openconnect/files/openconnect.sh @@ -93,9 +93,9 @@ proto_openconnect_setup() { append_args --no-system-trust } - if [ "${juniper:-0}" -gt 0 ]; then - append_args --juniper - fi + [ "${juniper:-0}" -gt 0 ] && [ -z "$vpn_protocol" ] && { + vpn_protocol="nc" + } [ -n "$vpn_protocol" ] && { append_args --protocol "$vpn_protocol"