On Fri, Jan 6, 2012 at 14:16, Chris Cappuccio <ch...@nmedia.net> wrote: > Peter Bisroev [pe...@int19h.net] wrote: >> >> Thank you for a quick response guys! Chris if you are talking about >> modifying /etc/rc does that mean that there could be a plan in the >> future to add that to the CVS? In the interim, should I test your >> patch or is Stuart's way of starting unbound should be used for now? >> >> Cheers, >> --peter > > This might be suitable to commit. Stuart? > > Index: etc/rc > =================================================================== > RCS file: /cvs/src/etc/rc,v > retrieving revision 1.397 > diff -u -r1.397 rc > --- etc/rc B B B 9 Dec 2011 14:52:26 -0000 B B B 1.397 > +++ etc/rc B B B 6 Jan 2012 19:10:29 -0000 > @@ -232,6 +232,9 @@ > B if [ X"$1" = X"shutdown" ]; then > B B B B dd if=/dev/arandom of=/var/db/host.random bs=65536 count=1 >/dev/null 2>&1 > B B B B chmod 600 /var/db/host.random >/dev/null 2>&1 > + B B B if [ -n "${pkg_early_scripts}" ]; then > + B B B B B B B pkg_scripts="${pkg_scripts} ${pkg_early_scripts}" > + B B B fi > B B B B local _c=$? > B B B B if [ ${_c} -eq 0 -a -n "${pkg_scripts}" ]; then > B B B B B B B B echo -n 'stopping package daemons:' > @@ -396,7 +399,14 @@ > B make_keys > > B echo -n 'starting early daemons:' > -start_daemon syslogd ldattach pflogd named nsd ntpd isakmpd iked sasyncd > +start_daemon syslogd > +# Run rc.d(8) early scripts from packages > +if [ -n "${pkg_early_scripts}" ]; then > + B B B for _r in $pkg_early_scripts; do > + B B B B B B B [ -x /etc/rc.d/${_r} ] && start_daemon ${_r} > + B B B done > +fi > +start_daemon ldattach pflogd named nsd ntpd isakmpd iked sasyncd > B start_daemon ldapd > B echo '.' > > Index: share/man/man8/rc.conf.8 > =================================================================== > RCS file: /cvs/src/share/man/man8/rc.conf.8,v > retrieving revision 1.19 > diff -u -r1.19 rc.conf.8 > --- share/man/man8/rc.conf.8 B B 8 Jul 2011 17:43:58 -0000 B B B 1.19 > +++ share/man/man8/rc.conf.8 B B 6 Jan 2012 19:10:29 -0000 > @@ -103,7 +103,9 @@ > B .Pp > B The fourth section contains the > B .Va pkg_scripts > -variable, responsible for starting and stopping > +and > +.Va pkg_early_scripts > +variables, responsible for starting and stopping > B .Xr rc.d 8 > B scripts installed by packages in the specified order. > B For example, the following line > @@ -120,6 +122,16 @@ > B argument at boot time and in reverse order with the > B .Va stop > B argument at shutdown. > +Packages listed in the > +.Va pkg_early_scripts > +variable are started before any other system daemons, except syslogd. The > +.Va pkg_early_scripts > +variable is suitable for starting package daemons needed early, such > +as syslog or resolver packages which are replacing system daemons. > +Many packages can not be started early, as ldconfig has not initialized > +the shared library cache for package libraries prior to the > +.Va pkg_early_scripts > +entry point. > B .Sh SEE ALSO > B .Xr init 8 , > B .Xr intro 8 , > Index: share/man/man8/rc.d.8 > =================================================================== > RCS file: /cvs/src/share/man/man8/rc.d.8,v > retrieving revision 1.20 > diff -u -r1.20 rc.d.8 > --- share/man/man8/rc.d.8 B B B 9 Oct 2011 08:54:29 -0000 B B B 1.20 > +++ share/man/man8/rc.d.8 B B B 6 Jan 2012 19:10:29 -0000 > @@ -45,7 +45,9 @@ > B .Xr packages 7 > B may be started at boot time in the order specified by the > B .Va pkg_scripts > -variable from > +and > +.Va pkg_early_scripts > +variables from > B .Xr rc.conf 8 ; > B the order will be reversed during shutdown. > B Services comprising >
Hi Chris, Stuart, What are your thoughts on this commit? Do you think that it will make it to the next release? Thanks! --peter