diff options
Diffstat (limited to 'security/openvpn/files')
-rw-r--r-- | security/openvpn/files/openvpn.in | 9 |
1 files changed, 9 insertions, 0 deletions
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 |