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/openvpn | |
parent | 9e17859c5a0cc93a2160e2d233797ed0c7c30863 (diff) | |
download | ports-f9b85c98f1c96ceb4f98b004da1957305dfabeb6.tar.gz ports-f9b85c98f1c96ceb4f98b004da1957305dfabeb6.zip |
Notes
Diffstat (limited to 'security/openvpn')
-rw-r--r-- | security/openvpn/Makefile | 1 | ||||
-rw-r--r-- | security/openvpn/files/openvpn.sh.in | 16 |
2 files changed, 7 insertions, 10 deletions
diff --git a/security/openvpn/Makefile b/security/openvpn/Makefile index 4031cc8a239d..f9cc146baec1 100644 --- a/security/openvpn/Makefile +++ b/security/openvpn/Makefile @@ -85,6 +85,7 @@ post-build: cd ${WRKSRC}/plugin/auth-pam && ${CC} ${CPPFLAGS} -I../.. -DDLOPEN_PAM=0 ${CFLAGS} -fPIC -shared -Wl,-soname,openvpn-auth-pam.so -o openvpn-auth-pam.so auth-pam.c pamdl.c -lc -lpam @# self-tests here .if !defined(WITHOUT_CHECK) + @${ECHO} ; ${ECHO} "### Note that you can skip these lengthy selftests with WITHOUT_CHECK=yes ###" ; ${ECHO} cd ${WRKSRC} && ${MAKE} check .endif diff --git a/security/openvpn/files/openvpn.sh.in b/security/openvpn/files/openvpn.sh.in index 64f6da0afbe7..9a081ed48e4f 100644 --- a/security/openvpn/files/openvpn.sh.in +++ b/security/openvpn/files/openvpn.sh.in @@ -31,7 +31,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 @@ -67,23 +67,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 @@ -123,8 +121,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\"}" |