Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 1995 23:24:00 -0400
From:      Coranth Gryphon <gryphon@healer.com>
To:        jmb@kryten.atinc.com, peter@taronga.com
Cc:        hackers@freebsd.org
Subject:   Re: ports startup scripts
Message-ID:  <199509230324.XAA05317@healer.com>

next in thread | raw e-mail | index | archive | help
From: peter@taronga.com (Peter da Silva)
> > Yes, if we are going to a many-scripts each performing one task paradigm, 
> > PLEASE do not place the scripts in more than one directory.   
> > flip-flopping around from place to place to figure out the boot sequence 
> > on ssyv machines drives me crazy....

> I don't understand. The boot sequence is very simple to find out:
> Files in /etc/init.d are only executed by hand if you need to stop or
> restart a specific service.

But keeping a set of directories for the sole purpose of linking
to one common directory is hellishly redundant.

If everything is in one directory, keep it only in one directory
and reference it by file. Or keep it in multiple directories.

For example "rc.3" is a file for run-level (or run-state) 3
that describes what gets run and what doesn't. Which means all we've
done is make more copies of "rc.local". Nevermind.

We've gone full spiral. Let's start over.

There are basically 5 options for system:

1) Single file (current BSD mechanism, /etc/rc)
2) Single file for run-states (inittab), single directory (init.d) for scripts
3) Multiple files for run-states (like current, /etc/rc.#),
	single directory to hold scripts
4) Multiple directories for run-states (/etc/rc#.d) to hold scripts
5) Multiple directories for run-levels (/etc/rc#.d) to hold scripts

Anything else is overly complex and gains us nothing over the above.
The differnece between run-states and run-levels is that for the
latter, all things done at an earlier state are done as well.

Original issue: What do we allow ports and packages to modify?

Simplest is #4 or #5 so they do not muck with system scripts.
Failing that #2 or #3; at least it is clear what is modified how and where.

Similar Implementations:
SysV uses a combination of 2 and 4 (inittab plus dirs).
DOS  uses a simplified version of #2 (one file which is multiple scripts).

Personally, I like 5. I'd prefer real run-levels, since that is going
to cover 90+% of what you'll need to do.  Keep with the four simple levels:

	0 	stop
	1	single user
	2	multi user, local daemons
	3	full/network

This is the "how much of /etc/rc" do I implement.
On going up, run anything <= level with argument "start".
On going down, run anything > level with argument "stop".

Very simple. Does everything we need. I'll even volunterr to
coordinate it and help implement it for 2.2

-coranth

------------------------------------------+------------------------+
Coranth Gryphon <gryphon@healer.com>      |  "Faith Manages."      |
                                          |        - Satai Delenn  |
Phone: 603-598-3440   Fax: 603-598-3430   +------------------------+
USMail: 11 Carver St, Nashua, NH  03060
Disclaimer: All these words are yours, except Europa... 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509230324.XAA05317>