Subject: Re: machine-dependent rc files?
To: Jason Thorpe <>
From: None <Chris_G_Demetriou@NIAGARA.NECTAR.CS.CMU.EDU>
List: tech-userlevel
Date: 01/11/1996 15:59:38
> I was looking at bin/1262 ([non-critical/medium]: screenblank isn't started.)
> and was was wondering if we might want to have /etc/rc call 
> machine-dependent scripts such as rc.sparc or rc.sun3 or rc.hp300 or 
> whatever to deal with stuff that's somewhat machine-dependent.  I was 
> thinking something like this:
> # Run machine-dependent startup sequence
> machtype=`sysctl -n hw.machine`
> if [ -f /etc/rc.${machtype} ]; then
> 	. /etc/rc.${machtype}
> fi
> Comments?  Am I opening a can of worms I don't want to open?  :-)

No, you're just supplying the can opener.  8-)

Why bother with hacks like this?  why not just:
	(1) make a whole bunch of init.d files, and
	(2) have a potentially different set of them symlinked in to
	    run by default, on each architecture?

At some point, this becomes silly...

for instance, why wouldn't 'ldconfig' be included in rc.${machtype}?
(will you end up needing an rc.${machtype}.local?)

it seems to me that standard system bins should be started in similar
ways on all architectures (and, if they're started in different ways,
it's because the user wanted it that way).  Given that, what you want
is "init.d/screenblank" which invokes screenblank, and then you invoke
that on the architectures where it's appropriate.  8-)