diff options
author | Matthias Andree <mandree@FreeBSD.org> | 2016-04-05 02:08:04 +0000 |
---|---|---|
committer | Matthias Andree <mandree@FreeBSD.org> | 2016-04-05 02:08:04 +0000 |
commit | 6594177e3fb78ad30616ad0678f90d4fe16af992 (patch) | |
tree | 8a3f8e14d2330393fdcece6e71f6643ba2e5aa92 /security/openvpn/files | |
parent | - Update to 20151014 (diff) |
Work around 10.3-RELEASE's service(8) shortcomings
PR: 208534
Reported by: allan@saddi.com
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 |