Subject: Re: rc.local and rcorder(8)
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Greg A. Woods <woods@weird.com>
List: current-users
Date: 06/25/2002 12:06:27
[ On Tuesday, June 25, 2002 at 17:19:22 (+0200), Manuel Bouyer wrote: ]
> Subject: Re: rc.local and rcorder(8)
>
> Yes, there are. But there may be daemons that have a rc.d script, and that
> I want to be started last, even after rc.local, because they take very
> long to start (I'm thinking about atalk, for example)

That's really not a very good excuse because I think that's a bug in the
way such daemons are started, not in the ordering of where rc.local
falls into the picture.

One way to "solve" this debate would be to put "local=NO" in defaults/rc.conf.

That way an end user admin would have to explicitly turn it on, and a
comment could be included in /etc/rc.local itself, rc(8), and also in
defaults/rc.conf to remind them that it will be run as per the ordering
defined by the keywords in the script.

It also helps to have a "debug" option to /etc/rc that'll cause it to
print what it'll do instead of doing it.  That way anyone can find out
in what order all the scripts will be invoked.  I think I've posted this
suggestion several times before....  :-)

hand-hacked diff....

***************
*** N,N ****
  umask 022
  
! if [ "$1" = autoboot ]; then
! 	autoboot=yes
! 	rc_fast=yes	# run_rc_command(): do fast booting
! fi
! 
! stty status '^T'


--- N,N ---
  umask 022
  
! stty status '^T'
! 
! debug_echo=""
! 
! case "$1" in
! autoboot)
! 	autoboot="yes"
! 	_rc_fast_run="yes"	# run_rc_command(): do fast booting
! 	;;
! -d)
! 	debug_echo="echo"
! 	;;
! esac
  
  . /etc/rc.subr
***************
*** N,N ****

  for _rc_elem in $files; do
! 	run_rc_script $_rc_elem start
  done
  
--- N,N ---

  for _rc_elem in $files; do
! 	$debug_echo run_rc_script $_rc_elem start
  done
  

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>