diff options
author | Ryan Steinmetz <zi@FreeBSD.org> | 2017-09-20 12:58:19 +0000 |
---|---|---|
committer | Ryan Steinmetz <zi@FreeBSD.org> | 2017-09-20 12:58:19 +0000 |
commit | 5e0ae96a7b46e4c17ea8892620fd8ff6478b978a (patch) | |
tree | 51a214c7c0b692e640305aa60fd31a69520c8536 /net/isc-dhcp43-server | |
parent | 4bb3f8dbd4c87c4e08a87c011ca4627dc6af533c (diff) | |
download | ports-5e0ae96a7b46e4c17ea8892620fd8ff6478b978a.tar.gz ports-5e0ae96a7b46e4c17ea8892620fd8ff6478b978a.zip |
Notes
Diffstat (limited to 'net/isc-dhcp43-server')
-rw-r--r-- | net/isc-dhcp43-server/Makefile | 2 | ||||
-rw-r--r-- | net/isc-dhcp43-server/files/isc-dhcpd.in | 26 |
2 files changed, 19 insertions, 9 deletions
diff --git a/net/isc-dhcp43-server/Makefile b/net/isc-dhcp43-server/Makefile index a70863aa1981..8a66eecb91ec 100644 --- a/net/isc-dhcp43-server/Makefile +++ b/net/isc-dhcp43-server/Makefile @@ -18,7 +18,7 @@ LICENSE= ISCL USES= gmake -PORTREVISION_SERVER= 0 +PORTREVISION_SERVER= 1 PORTREVISION_CLIENT= 0 PORTREVISION_RELAY= 0 diff --git a/net/isc-dhcp43-server/files/isc-dhcpd.in b/net/isc-dhcp43-server/files/isc-dhcpd.in index 11975dc15dd8..689bc219a83e 100644 --- a/net/isc-dhcp43-server/files/isc-dhcpd.in +++ b/net/isc-dhcp43-server/files/isc-dhcpd.in @@ -13,6 +13,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), @@ -24,7 +30,11 @@ case $0 in ;; esac +# default name to "dhcpd" if guessing failed +# Trailing semicolon also for service(8)'s benefit: +name="${name:-dhcpd}" ; name=${name##*/isc-} + paranoia=%%PARANOIA%% # compiled in paranoia? load_rc_config ${name} @@ -308,7 +318,7 @@ check_chroot () fi } -rcvar_chuser () +_rcvar_chuser () { if checkyesno paranoia && checkyesno ${name}_chuser_enable; then eval "${name}_piddir=\${__dhcpd_piddir}/\${name}" @@ -318,7 +328,7 @@ rcvar_chuser () fi } -rcvar_chroot () +_rcvar_chroot () { if ! checkyesno paranoia || ! checkyesno ${name}_chroot_enable; then eval "${name}_rootdir=" @@ -328,7 +338,7 @@ rcvar_chroot () fi } -rcvar_pidnleases () +_rcvar_pidnleases () { if ! checkyesno ${name}_chuser_enable; then eval "${name}_piddir=\${__dhcpd_piddir}" @@ -340,7 +350,7 @@ rcvar_pidnleases () eval "${name}_confdir=\$(dirname \${${name}_conffile})" } -rcvar_rooted () +_rcvar_rooted () { eval "_dhcpd_rootdir=\${${name}_rootdir}" eval "_dhcpd_devdir=\${${name}_rootdir}\${${name}_devdir}" @@ -460,10 +470,10 @@ dhcpd_check () dhcpd_rcvar () { - rcvar_chuser - rcvar_chroot - rcvar_pidnleases - rcvar_rooted + _rcvar_chuser + _rcvar_chroot + _rcvar_pidnleases + _rcvar_rooted } dhcpd_precmd () |