mirror of
https://git.freebsd.org/ports.git
synced 2025-05-31 18:36:28 -04:00
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>
This commit is contained in:
parent
65769d123d
commit
94d85e9b3e
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=185921
4 changed files with 24 additions and 4 deletions
|
@ -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.
|
||||
|
|
|
@ -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%%"
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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%%"
|
||||
|
|
Loading…
Add table
Reference in a new issue