aboutsummaryrefslogtreecommitdiff
path: root/net/openconnect/files
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-01-19 22:46:12 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-01-19 23:15:57 +0100
commit500db547b82fbdc18355469b4572fded8fe040b6 (patch)
tree64d41045696355919535041e47a070ec8b4eaac9 /net/openconnect/files
parentab50e4802f3af1db1d82db503a6e5b0664549f61 (diff)
openconnect: use openconnect.upgrade to save configured files
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'net/openconnect/files')
-rwxr-xr-xnet/openconnect/files/openconnect.sh5
-rw-r--r--net/openconnect/files/openconnect.upgrade3
2 files changed, 8 insertions, 0 deletions
diff --git a/net/openconnect/files/openconnect.sh b/net/openconnect/files/openconnect.sh
index 553a4ed51..cd97c2cb2 100755
--- a/net/openconnect/files/openconnect.sh
+++ b/net/openconnect/files/openconnect.sh
@@ -38,6 +38,11 @@ proto_openconnect_setup() {
cmdline="$server$port -i vpn-$config --non-inter --syslog --script /lib/netifd/vpnc-script"
+ # migrate to standard config files
+ [ -f "/etc/config/openconnect-user-cert-vpn-$config.pem" ] && mv "/etc/config/openconnect-user-cert-vpn-$config.pem" "/etc/openconnect/user-cert-vpn-$config.pem"
+ [ -f "/etc/config/openconnect-user-key-vpn-$config.pem" ] && mv "/etc/config/openconnect-user-key-vpn-$config.pem" "/etc/openconnect/user-key-vpn-$config.pem"
+ [ -f "/etc/config/openconnect-ca-vpn-$config.pem" ] && mv "/etc/config/openconnect-ca-vpn-$config.pem" "/etc/openconnect/ca-vpn-$config.pem"
+
[ -f /etc/openconnect/user-cert-vpn-$config.pem ] && append cmdline "-c /etc/openconnect/user-cert-vpn-$config.pem"
[ -f /etc/openconnect/user-key-vpn-$config.pem ] && append cmdline "--sslkey /etc/openconnect/user-key-vpn-$config.pem"
[ -f /etc/openconnect/ca-vpn-$config.pem ] && {
diff --git a/net/openconnect/files/openconnect.upgrade b/net/openconnect/files/openconnect.upgrade
new file mode 100644
index 000000000..0e9192d57
--- /dev/null
+++ b/net/openconnect/files/openconnect.upgrade
@@ -0,0 +1,3 @@
+/etc/openconnect/user-cert-vpn-*.pem
+/etc/openconnect/user-key-vpn-*.pem
+/etc/openconnect/ca-vpn-*.pem