summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--security/openvpn/Makefile1
-rw-r--r--security/openvpn/files/openvpn.in9
2 files changed, 10 insertions, 0 deletions
diff --git a/security/openvpn/Makefile b/security/openvpn/Makefile
index 2ff626823032..6c56a25f3d8e 100644
--- a/security/openvpn/Makefile
+++ b/security/openvpn/Makefile
@@ -3,6 +3,7 @@
PORTNAME= openvpn
DISTVERSION= 2.3.10
+PORTREVISION= 1
CATEGORIES= security net
MASTER_SITES= http://swupdate.openvpn.net/community/releases/ \
http://build.openvpn.net/downloads/releases/
diff --git a/security/openvpn/files/openvpn.in b/security/openvpn/files/openvpn.in
index f4f1dbdbb7ad..bc77d1da9c90 100644
--- a/security/openvpn/files/openvpn.in
+++ b/security/openvpn/files/openvpn.in
@@ -64,6 +64,12 @@
. /etc/rc.subr
+# service(8) does not create an authentic environment, try to guess,
+# and as of 10.3-RELEASE-p0, it will not find the indented name=
+# assignments below. So give it a default.
+# Trailing semicolon also for service(8)'s benefit:
+name="$file" ;
+
case "$0" in
/etc/rc*)
# during boot (shutdown) $0 is /etc/rc (/etc/rc.shutdown),
@@ -75,6 +81,9 @@ case "$0" in
;;
esac
+# default name to "openvpn" if guessing failed
+# Trailing semicolon also for service(8)'s benefit:
+name="${name:-openvpn}" ;
name="${name##*/}"
rcvar=${name}_enable