summaryrefslogtreecommitdiff
path: root/security/openvpn20
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2007-02-25 19:42:55 +0000
committerVasil Dimov <vd@FreeBSD.org>2007-02-25 19:42:55 +0000
commit94d85e9b3e361fad76e41925dd5c88a84223dfc7 (patch)
tree3335bb25ac79b90cdf2d8b62b10ea60b619464b0 /security/openvpn20
parentUpdate to 2.14.3. (diff)
Fix a bug I introduced with last commit which resulted in openvpn not
being started during boot. The reason for this is that at boot $0 is not /usr/local/etc/rc.d/openvpn but /etc/rc. The fix is a bit hackish because it retrieves the script name from $_file - variable used in run_rc_script(). Reported by: bazzoola <bazzoola@gmail.com>
Notes
Notes: svn path=/head/; revision=185921
Diffstat (limited to 'security/openvpn20')
-rw-r--r--security/openvpn20/Makefile2
-rw-r--r--security/openvpn20/files/openvpn.sh.in12
2 files changed, 12 insertions, 2 deletions
diff --git a/security/openvpn20/Makefile b/security/openvpn20/Makefile
index 828ef991a044..bfe7f7c34c4c 100644
--- a/security/openvpn20/Makefile
+++ b/security/openvpn20/Makefile
@@ -13,7 +13,7 @@ PORTNAME= openvpn
# WILL BE DROPPED.
# -----------------------------------------------------
PORTVERSION= 2.0.6
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= security net
# MASTER_SITES points to hosts in distinct data centers,
# so just one MASTER_SITES entry should be OK.
diff --git a/security/openvpn20/files/openvpn.sh.in b/security/openvpn20/files/openvpn.sh.in
index 92e1d704695c..54b710c47626 100644
--- a/security/openvpn20/files/openvpn.sh.in
+++ b/security/openvpn20/files/openvpn.sh.in
@@ -63,7 +63,17 @@
. %%RC_SUBR%%
-name=$(basename "$0")
+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")
+ ;;
+ *)
+ name=$(basename "$0")
+ ;;
+esac
+
rcvar=`set_rcvar`
prefix="%%PREFIX%%"