Index: net/isc-dhcp41-server/files/isc-dhcpd.in =================================================================== RCS file: /home/ncvs/ports/net/isc-dhcp41-server/files/isc-dhcpd.in,v retrieving revision 1.5 diff -u -r1.5 isc-dhcpd.in --- net/isc-dhcp41-server/files/isc-dhcpd.in 22 Oct 2011 21:28:24 -0000 1.5 +++ net/isc-dhcp41-server/files/isc-dhcpd.in 18 Mar 2012 03:22:22 -0000 @@ -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 @@ 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 @@ cleanup_chroot } +dhcpd_restartprecmd () +{ + setup_chroot + setup_flags + dhcpd_checkconfig +} + dhcpd_checkconfig () { local rc_flags_mod @@ -509,8 +518,9 @@ 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" Index: net/isc-dhcp42-server/files/isc-dhcpd.in =================================================================== RCS file: /home/ncvs/ports/net/isc-dhcp42-server/files/isc-dhcpd.in,v retrieving revision 1.2 diff -u -r1.2 isc-dhcpd.in --- net/isc-dhcp42-server/files/isc-dhcpd.in 22 Oct 2011 13:31:31 -0000 1.2 +++ net/isc-dhcp42-server/files/isc-dhcpd.in 18 Mar 2012 03:20:46 -0000 @@ -384,7 +384,10 @@ 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 @@ -476,6 +479,13 @@ cleanup_chroot } +dhcpd_restartprecmd () +{ + setup_chroot + setup_flags + dhcpd_checkconfig +} + dhcpd_checkconfig () { local rc_flags_mod @@ -508,8 +518,9 @@ 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"