openconnect: avoid using the --juniper switch
authorRui Salvaterra <rsalvaterra@gmail.com>
Tue, 31 May 2022 08:06:49 +0000 (09:06 +0100)
committerRosen Penev <rosenp@gmail.com>
Wed, 1 Jun 2022 20:54:13 +0000 (13:54 -0700)
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 <rsalvaterra@gmail.com>
net/openconnect/files/openconnect.sh

index 58e44be931489e9336f5d90f80f958a389df8505..e80cf969e02c41c7021f890c98724901c55e265f 100755 (executable)
@@ -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"