diff options
author | vd <vd@FreeBSD.org> | 2007-02-26 03:42:55 +0800 |
---|---|---|
committer | vd <vd@FreeBSD.org> | 2007-02-26 03:42:55 +0800 |
commit | c8bdeeba364f9ef3c08f6be9c47cdf0bad78f93d (patch) | |
tree | a1727efd3a2f9773180f1734e3294a1a7651bd83 /security/openvpn | |
parent | 47cd170f37f2ef2c17246caf900959e77c33d298 (diff) | |
download | freebsd-ports-gnome-c8bdeeba364f9ef3c08f6be9c47cdf0bad78f93d.tar.gz freebsd-ports-gnome-c8bdeeba364f9ef3c08f6be9c47cdf0bad78f93d.tar.zst freebsd-ports-gnome-c8bdeeba364f9ef3c08f6be9c47cdf0bad78f93d.zip |
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>
Diffstat (limited to 'security/openvpn')
-rw-r--r-- | security/openvpn/Makefile | 2 | ||||
-rw-r--r-- | security/openvpn/files/openvpn.sh.in | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/security/openvpn/Makefile b/security/openvpn/Makefile index 828ef991a044..bfe7f7c34c4c 100644 --- a/security/openvpn/Makefile +++ b/security/openvpn/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/openvpn/files/openvpn.sh.in b/security/openvpn/files/openvpn.sh.in index 92e1d704695c..54b710c47626 100644 --- a/security/openvpn/files/openvpn.sh.in +++ b/security/openvpn/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%%" |