Subject: Re: /etc/init.d versus /etc/rc (was: NetBSD master CVS tree commits)
To: None <current-users@NetBSD.ORG>
From: Simon J. Gerraty <email@example.com>
Date: 04/02/1996 08:54:58
Wow, I missed this whole thread... only the final burst today had a
Subject that was remotely related... anyway, I know this thread is in
its dying stage (probably for the best :-) but the comments below have
been repeated by several folk.
>>Make it an option. Enable it by default if you must, but there are those
>>of us who would prefer to run it "the old way". A run-time check would
>>be the best way to go.
I don't think a run time option is viable. Unless you think it is
viable to only provide an implementation of one option. NetBSD
probably does not have the resources to keep rc,rc.local and init.d all
up to date and in sync. The result is that folk who chose option B,
will be on their own. That's cool btw, that's what we (well I) have
The only viable (not necessarily acceptable) way to support both camps
is to (as cgd suggested) have S00rc as the only S* script enabled and
the rc,rc.local crew would need to edit that instead of /etc/rc.
>Right. /etc/rc should check for an /etc/init.d, and if it's there run
>that and ignore /etc/rc.local. If that directory isn't there, run
>/etc/rc.local. Does this sound ok?
Note quite. In sysV, init.d does not contain S* and K* scripts it is
simply a holding area for start/stop scripts (same as my rc_d). In
SysV you might have
/etc/rc2.d/S30nfs -> ../init.d/nfs
This approach has the advantage that you can disable auto startup
of a service by just `rm /etc/rc2.d/S30nfs`, though may people prefer
`mv /etc/rc2.d/S30nfs /etc/rc2.d/s30nfs`.
The other advantage is that the admin knows he can just run
without having to know which S* script in which directory handles sendmail.
Actually my /etc/rc_d/sendmail takes "restart".
In NetBSD's case init runs /etc/rc which would run rc.d/S*
That's all there is to it. At least that's how I do it. So if as
Mouse says folk like haveing everything in one file, just keep editing
/etc/rc.d/S20rc or whatever its called. One ugly S* name isn't too
much is it.
>It is assumed that there will be an entry in /etc/init.d/ which will
>run /etc/rc.local if it is present in the first case above.
If desired one of the rc.d/S* files can run /etc/rc.local or in my
case it runs /etc/rc_local.sh which in turn runs rc_local.d/S*