diff options
author | Ryan Steinmetz <zi@FreeBSD.org> | 2012-03-19 01:28:35 +0000 |
---|---|---|
committer | Ryan Steinmetz <zi@FreeBSD.org> | 2012-03-19 01:28:35 +0000 |
commit | 6d1fcb09166168e522494d9b5f07833234cc046c (patch) | |
tree | a6c395076ea35cb7cfe2eea2f41b16afff64fdc9 /net/isc-dhcp41-server | |
parent | 97ddcf58ff57245888418b9eeef6c62126df45e9 (diff) | |
download | ports-6d1fcb09166168e522494d9b5f07833234cc046c.tar.gz ports-6d1fcb09166168e522494d9b5f07833234cc046c.zip |
- Resolve issue where the the daemon would fail to start [1]
- Resolve issue on systems set to UTC time would fail copying /etc/localtime to the chroot [2]
PR: ports/162447 [1]
Submitted by: Hilko Meyer <hilko.meyer@gmx.de> [1]
Reported by: dougb@ [2]
Feature safe: yes
Notes
Notes:
svn path=/head/; revision=293547
Diffstat (limited to 'net/isc-dhcp41-server')
-rw-r--r-- | net/isc-dhcp41-server/files/isc-dhcpd.in | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/net/isc-dhcp41-server/files/isc-dhcpd.in b/net/isc-dhcp41-server/files/isc-dhcpd.in index 8e1c1edae710..57cc0cf4dd1a 100644 --- a/net/isc-dhcp41-server/files/isc-dhcpd.in +++ b/net/isc-dhcp41-server/files/isc-dhcpd.in @@ -10,7 +10,6 @@ # Add the following line to /etc/rc.conf to enable dhcpd: # # dhcpd_enable="YES" -# . /etc/rc.subr @@ -385,7 +384,10 @@ setup_chroot () eval "safe_copy \${${name}_conffile} \${_dhcpd_conffile}" eval "safe_copy \${${name}_etcdir}/\$_hconf \${_dhcpd_etcdir}/\$_hconf" eval "safe_copy \${${name}_etcdir}/\$_hosts \${_dhcpd_etcdir}/\$_hosts" - eval "safe_copy \${${name}_etcdir}/\$_ltime \${_dhcpd_etcdir}/\$_ltime" + # copy localtime only if it exists + if eval "[ -f \"\${${name}_etcdir}/\$_ltime\" ]"; then + eval "safe_copy \${${name}_etcdir}/\$_ltime \${_dhcpd_etcdir}/\$_ltime" + fi eval "safe_copy \${${name}_etcdir}/\$_rconf \${_dhcpd_etcdir}/\$_rconf" # copy dhcpd_includedir if defined and available if eval "[ -d \"\${${name}_includedir}\" ]"; then @@ -477,6 +479,13 @@ dhcpd_postcmd () cleanup_chroot } +dhcpd_restartprecmd () +{ + setup_chroot + setup_flags + dhcpd_checkconfig +} + dhcpd_checkconfig () { local rc_flags_mod @@ -509,8 +518,9 @@ pidfile=${_dhcpd_pidfile} eval "required_files=\${${name}_conf}" start_precmd=dhcpd_precmd stop_postcmd=dhcpd_postcmd -restart_precmd="dhcpd_checkconfig" +restart_precmd="dhcpd_restartprecmd" uninstall_cmd=dhcpd_uninstall -extra_commands="uninstall" +configtest_cmd="dhcpd_restartprecmd" +extra_commands="uninstall configtest" run_rc_command "$1" |