Subject: Re: What about startup scripts??
To: Frederick Bruckman <fb@enteract.com>
From: Al B. Snell <alaric@alaric-snell.com>
List: tech-pkg
Date: 01/03/2001 11:14:29
On Tue, 2 Jan 2001, Frederick Bruckman wrote:

> > sysadmin who wants per-machine differences can put conditionals in his
> > centrally-maintained config files (a nice way of handling it anyway) or
> > make the shraed config file source /etc/<whatever>...
> 
> Um, no he can't. Not without extensive changes to /etc/rc.
> "/etc/rc.conf" and friends must be sourced before "rcorder" orders and
> invokes the rc scripts. This is done BEFORE THE FILE-SYSTEMS ARE
> MOUNTED, BEFORE THE NETWORK IS UP, in fact, while ROOT IS STILL
> MOUNTED READ-ONLY. (Excuse my shouting.) If you want to share config
> files between machines, you'll have to do it with "rsync" or "rdist".

Dude! Read the messages!

/etc/rc.conf is not in /usr or anything. It can be sourced before file
systems are mounted. That's not a problem.

"rcorder" does not execute the shell scripts - it doesn't care if they
refer to config files in other partitions; the headers in the scripts'
comments that rcorder reads will be used to make sure that all package
scripts installed in there are started after relevant filesystems are
mounted. Package scripts in /etc/rc.d source their own config file from
/usr/pkg/etc.

These scripts, we concurred earlier, should all source
/usr/pkg/etc/rc.conf rather than having seperate config files.

/usr/pkg/etc/rc.conf, being a shell script, can contain conditionals on
hostname, conditionals on a hypothetical 'hosttype' value stored in /etc
for people running large clusters that can be subdivided nito groups, or
it can just source /etc/rc.pkg.conf after setting up defaults, to allow
for per-machine overrides.

Nothing needs to touch /usr until the scripts to start packages
installed there are actually run, which (obviously) only happens after the
relevant filesystem is mounted :-)

ABS

-- 
                               Alaric B. Snell
 http://www.alaric-snell.com/  http://RFC.net/  http://www.warhead.org.uk/
   Any sufficiently advanced technology can be emulated in software