diff options
author | Matthias Andree <mandree@FreeBSD.org> | 2011-01-08 10:07:00 +0000 |
---|---|---|
committer | Matthias Andree <mandree@FreeBSD.org> | 2011-01-08 10:07:00 +0000 |
commit | f9b85c98f1c96ceb4f98b004da1957305dfabeb6 (patch) | |
tree | 72f6448467dcb2f0238caca82524efe404a16282 /security/openvpn20 | |
parent | 9e17859c5a0cc93a2160e2d233797ed0c7c30863 (diff) |
Notes
Diffstat (limited to 'security/openvpn20')
-rw-r--r-- | security/openvpn20/files/openvpn.sh.in | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/security/openvpn20/files/openvpn.sh.in b/security/openvpn20/files/openvpn.sh.in index 050984cdef9c..894b40538616 100644 --- a/security/openvpn20/files/openvpn.sh.in +++ b/security/openvpn20/files/openvpn.sh.in @@ -30,7 +30,7 @@ # ----------------------------------------------------------------------------- # # This script supports running multiple instances of openvpn. -# To run additional instance link this script to something like +# To run additional instances link this script to something like # % ln -s openvpn openvpn_foo # and define additional openvpn_foo_* variables in one of # /etc/rc.conf, /etc/rc.conf.local or /etc/rc.conf.d/openvpn_foo @@ -66,23 +66,21 @@ case "$0" in /etc/rc*) # during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown), # so get the name of the script from $_file - name=$(basename "$_file" .sh) + name="$_file" ;; *) - name=$(basename "$0" .sh) + name="$0" ;; esac +name="${name##*/}" + rcvar=$(set_rcvar) openvpn_precmd() { for i in $interfaces ; do - # FreeBSD <= 5.4 does not know kldstat's -m option - # FreeBSD >= 6.0 does not add debug.* sysctl information - # in the default build - we check both to keep things simple - if ! sysctl debug.if_${i}_debug >/dev/null 2>&1 \ - && ! kldstat -m if_${i} >/dev/null 2>&1 ; then + if ! sysctl debug.if_${i}_debug >/dev/null 2>&1 ; then if ! kldload if_${i} ; then warn "Could not load $i module." return 1 @@ -114,8 +112,6 @@ stop_postcmd="stop_postcmd" load_rc_config ${name} eval ": \${${name}_enable:=\"NO\"}" -eval ": \${${name}_flags:=\"\"}" -eval ": \${${name}_if:=\"\"}" eval ": \${${name}_configfile:=\"%%PREFIX%%/etc/openvpn/${name}.conf\"}" eval ": \${${name}_dir:=\"%%PREFIX%%/etc/openvpn\"}" |