Subject: Re: correct "direction" of barriers in rc.d
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: Luke Mewburn <lukem@wasabisystems.com>
List: tech-userlevel
Date: 03/21/2002 17:26:38
On Wed, Mar 20, 2002 at 10:33:21AM -0800, Jason Thorpe wrote:
  | While building an image for an embedded system, I wanted to really
  | cut down on the number of scripts in /etc/rc.d.  Unfortunately, the
  | barrier dependencies (DAEMON, LOGIN, etc.) REQUIRE a bunch of scripts
  | that I wanted to remove (because I didn't need them).  This causes
  | rcorder(8) to complain about missing requirements.

The ability to make various rc.d scripts which are (effectively)
standalone optional by allowing them to be removed is a good one
idea.  This is the best argument you've made for the replacement
of the use of REQUIRE in the placeholder barrier scripts (i.e., by
convention those scripts with UPPERCASE names) to the use of BEFORE
in the dependency scripts.

That said, I'd like to avoid going overboard with unnecessary
wholesale conversion to BEFORE.  For example, no need to change
"bootconf REQUIRE: mountcritlocal" to "mountcritlocal BEFORE: bootconf".

Some comments:
	* please add an extra space after the "BEFORE:" so the
	  conditions line up ;-)
	* ipmon only needs to be BEFORE: SERVERS
	* savecore only needs to be BEFORE: SERVERS

Luke.


  | Index: ipmon
  | ===================================================================
  | RCS file: /cvsroot/basesrc/etc/rc.d/ipmon,v
  | retrieving revision 1.5
  | diff -u -r1.5 ipmon
  | --- ipmon	2002/02/28 01:06:13	1.5
  | +++ ipmon	2002/03/20 18:13:06
  | @@ -5,6 +5,7 @@
  |  
  |  # PROVIDE: ipmon
  |  # REQUIRE: syslogd
  | +# BEFORE: DAEMON SERVERS
  |  
  |  . /etc/rc.subr
  |  
  | Index: savecore
  | ===================================================================
  | RCS file: /cvsroot/basesrc/etc/rc.d/savecore,v
  | retrieving revision 1.3
  | diff -u -r1.3 savecore
  | --- savecore	2000/09/19 13:04:39	1.3
  | +++ savecore	2002/03/20 18:13:07
  | @@ -5,6 +5,7 @@
  |  
  |  # PROVIDE: savecore
  |  # REQUIRE: syslogd
  | +# BEFORE: DAEMON SERVERS
  |  
  |  . /etc/rc.subr
  |