From owner-freebsd-hackers Fri Sep 22 20:23:11 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id UAA15634 for hackers-outgoing; Fri, 22 Sep 1995 20:23:11 -0700 Received: from healer.com (healer-gw.Empire.Net [205.164.80.204]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id UAA15611 for ; Fri, 22 Sep 1995 20:22:59 -0700 Received: (from gryphon@localhost) by healer.com (8.6.11/8.6.9.1) id XAA05317; Fri, 22 Sep 1995 23:24:00 -0400 Date: Fri, 22 Sep 1995 23:24:00 -0400 From: Coranth Gryphon Message-Id: <199509230324.XAA05317@healer.com> To: jmb@kryten.atinc.com, peter@taronga.com Subject: Re: ports startup scripts Cc: hackers@freebsd.org Sender: owner-hackers@freebsd.org Precedence: bulk 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 | "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...