[Linux-disciples] Where to put startup instructions

Dylan Thurston dpt at lotus.bostoncoop.net
Sun May 8 17:38:40 EDT 2005


On Sun, May 08, 2005 at 11:45:04AM -0400, Adam Rosi-Kessel wrote:
> On Sun, May 08, 2005 at 11:33:41AM -0400, Stephen R Laniel wrote:
> > On Sun, May 08, 2005 at 11:25:59AM -0400, Adam Rosi-Kessel wrote:
> > > So my guess would be put it in /etc/rcS.d, but I don't know if that is
> > > "canonical."
> > Just to reclaim a small bit of my Debian Manhood, I was
> > aware of the /etc/init.d/-and-symlinks bit. But I think it's
> > a little tricky, because I need to know when /proc is going
> > to come up; only after it's up can I run the command I'm
> > looking to run.
> 
> Note that rcS.d is a little different from rc#.d.  I think it's that
> rcS.d goes before any of the runlevels, but I may be missing some
> subtlety.

I think rcS.d is also only run on startup/shutdown, not when you
change runlevels after boot.  It's also run when you go into
single-user mode--only put something there if you want it all the time.

> > So I guess my question was: is there any good general method
> > for figuring out which of the /etc/rcN.d directories a given
> > command should go in, or do we have to figure it out in an
> > ad-hoc way?
> 
> Well, in Debian we really don't have that many runlevels. There is 0
> (halt) and 6 (reboot), which aren't relevant here. Then 1 is single user
> mode, and 2-5 are all the same.

To be clear, this is the situation by default.  You can customize this.

> > I should be able to say, for instance, that your (Adam's)
> > ssh-login-blocker script can only go in after sshd has
> > started. I specify enough of these constraints ("only go
> > in after daemon D_1," "only go in before daemon D_2," etc.),
> > and Unix places the daemon in a position that's consistent
> > with the constraints I've given (or tells me that my
> > constraints are impossible to satisfy).
> 
> Actually, it doesn't matter when ssh_login_blocker starts--it doesn't
> depend or expect the ssh daemon to be running first.  So in this case you
> could start it anytime after the filesystems are mounted.

I guess it should run before /etc/nologin is removed also;
fortunately, that is run last.

Peace,
	Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20050508/e5863bb3/attachment.pgp


More information about the Linux-disciples mailing list