Peter Bisroev [pe...@int19h.net] wrote: > > After looking in the 'starting early daemons:' section in /etc/rc I ccan see > that > named and nsd are started before ntpd. If named is used as a recursive caching > DNS server everything would work as expected. But with nsd that would not be > the > case since it is an authoritative only server.
I suspect you want a feature like this. It would give you a pkg_early_scripts option to go in rc.conf.local along with your pkg_scripts. --- /etc/rc Fri Dec 9 10:13:53 2011 +++ rc Wed Jan 4 23:26:17 2012 @@ -232,6 +232,9 @@ if [ X"$1" = X"shutdown" ]; then dd if=/dev/arandom of=/var/db/host.random bs=65536 count=1 >/dev/null 2>&1 chmod 600 /var/db/host.random >/dev/null 2>&1 + if [ -n "${pkg_early_scripts}" ]; then + pkg_scripts="${pkg_scripts} ${pkg_early_scripts}" + fi local _c=$? if [ ${_c} -eq 0 -a -n "${pkg_scripts}" ]; then echo -n 'stopping package daemons:' @@ -394,6 +397,15 @@ dmesg >/var/run/dmesg.boot make_keys + +# Run rc.d(8) early scripts from packages +if [ -n "${pkg_early_scripts}" ]; then + echo -n 'starting early package daemons:' + for _r in $pkg_early_scripts; do + [ -x /etc/rc.d/${_r} ] && start_daemon ${_r} + done + echo '.' +fi echo -n 'starting early daemons:' start_daemon syslogd ldattach pflogd named nsd ntpd isakmpd iked sasyncd