瀏覽代碼

Revert "openconnect: move certificate files to config/ to add graceful upgrade"

This reverts commit b53e5bfe87.
Nikos Mavrogiannopoulos 10 年之前
父節點
當前提交
ab50e4802f
共有 2 個檔案被更改,包括 6 行新增13 行删除
  1. 3
    3
      net/openconnect/README
  2. 3
    10
      net/openconnect/files/openconnect.sh

+ 3
- 3
net/openconnect/README 查看文件

@@ -14,9 +14,9 @@ config interface 'MYVPN'
14 14
         option authgroup 'DEFAULT'
15 15
 
16 16
 The additional files are also used:
17
-/etc/config/openconnect-user-cert-vpn-MYVPN.pem: The user certificate
18
-/etc/config/openconnect-user-key-vpn-MYVPN.pem: The user private key
19
-/etc/config/openconnect-ca-vpn-MYVPN.pem: The CA certificate (instead of serverhash)
17
+/etc/openconnect/user-cert-vpn-MYVPN.pem: The user certificate
18
+/etc/openconnect/user-key-vpn-MYVPN.pem: The user private key
19
+/etc/openconnect/ca-vpn-MYVPN.pem: The CA certificate (instead of serverhash)
20 20
 
21 21
 After these are setup you can initiate the VPN using "ifup MYVPN", and
22 22
 deinitialize it using ifdown. You may also use the luci web interface

+ 3
- 10
net/openconnect/files/openconnect.sh 查看文件

@@ -38,19 +38,12 @@ proto_openconnect_setup() {
38 38
 
39 39
 	cmdline="$server$port -i vpn-$config --non-inter --syslog --script /lib/netifd/vpnc-script"
40 40
 
41
-	# migrate to new config files
42
-	[ -f /etc/openconnect/user-cert-vpn-$config.pem ] && mv "/etc/openconnect/user-cert-vpn-$config.pem" "/etc/config/openconnect-user-cert-vpn-$config.pem"
43
-	[ -f /etc/openconnect/user-key-vpn-$config.pem ] && mv "/etc/openconnect/user-key-vpn-$config.pem" "/etc/config/openconnect-user-key-vpn-$config.pem"
44
-	[ -f /etc/openconnect/ca-vpn-$config.pem ] && mv "/etc/openconnect/ca-vpn-$config.pem" "/etc/config/openconnect-ca-vpn-$config.pem"
45
-
46
-	# read new config files
47
-	[ -f /etc/config/openconnect-user-cert-vpn-$config.pem ] && append cmdline "-c /etc/config/openconnect-user-cert-vpn-$config.pem"
48
-	[ -f /etc/config/openconnect-user-key-vpn-$config.pem ] && append cmdline "--sslkey /etc/config/openconnect-user-key-vpn-$config.pem"
49
-	[ -f /etc/config/openconnect-ca-vpn-$config.pem ] && {
41
+	[ -f /etc/openconnect/user-cert-vpn-$config.pem ] && append cmdline "-c /etc/openconnect/user-cert-vpn-$config.pem"
42
+	[ -f /etc/openconnect/user-key-vpn-$config.pem ] && append cmdline "--sslkey /etc/openconnect/user-key-vpn-$config.pem"
43
+	[ -f /etc/openconnect/ca-vpn-$config.pem ] && {
50 44
 		append cmdline "--cafile /etc/openconnect/ca-vpn-$config.pem"
51 45
 		append cmdline "--no-system-trust"
52 46
 	}
53
-
54 47
 	[ -n "$serverhash" ] && {
55 48
 		append cmdline " --servercert=$serverhash"
56 49
 		append cmdline "--no-system-trust"