Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Sep 1995 10:02:39 -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:  <199509251402.KAA12092@healer.com>

next in thread | raw e-mail | index | archive | help
>From owner-freebsd-hackers@freefall.freebsd.org Sun Sep 24 14:40:07 1995
Date: Sun, 24 Sep 1995 11:19:40 -0400 (EDT)
Subject: Re: ports startup scripts
To: Peter da Silva <peter@taronga.com>
cc: hackers@freebsd.org
In-Reply-To: <199509241434.JAA09429@bonkers.taronga.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-hackers@freebsd.org
Precedence: bulk

On Sun, 24 Sep 1995, Peter da Silva wrote:

> > 	solves the rename problem.  not the 'is it the same of is it not, 
> > i have to did deeper' problem.
> 
> Sure. If you do it right you just need to make sure it's a symlink.

From: "Jonathan M. Bresler" <jmb@kryten.atinc.com>
>  urg....symlink.  two files.  requires diff or ls -F to determine 

Agreed. I've said it before - symlink are only useful if you
(for some reason) can't put something where it belongs, of if
it really needs to be in two places at one: the latter translates
as "cannot be easily gotten at in the proper place" or "a non-optimal
location is hard-coded in something".

There is no need to two sets of directorys off of /etc with
the contents of one being linked to the other.

> one directory for all run-states??  or one directory for each.  i 
> am advocating one directory for all start, kill and restart scripts.

I still prefer run-levels (as opposed to states), but I'd still
rather see one directory per state than anything else.

Run levels solve all the problems of "But it may need to be
in more than one place".

Or if you put it in one directory, you need either very careful
naming (can be done, risky) or a "inittab" control file. (solves the
ordering problem).

> 
> > In /etc/daily:
> > 	find /etc/rc*.d -type f -print > /tmp/$$

> yes.  but when i want to understand the startup/shutdown process 
> running a piece of /etc/daily is...not the obvious step.

Before depending upon /etc/daily, check with Jordan as to the new
way of doing daily/weekly/...  I mailed him the final version a
couple of days ago.

Daily (and weekly and monthly) is now just a list of scripts to call (the
list being just for ordering purposes) and is auto-generated from a config
file. This is very simple to implement and very easy to keep from getting
screwed up. We might just want to go with this framework for init as well...

> > 	i expect the ports-meister and packages-master to enforce that 
> > level of consistency.
> 
> You're assuming that only official ports are going to use this. Bad assumption.

> if you are using a non-offical port, you are NOT a newbie.  if 
> yoy really are a newbie, well, either you overestimated your capabilities 
> or your gaining experience ;)

Put in a "site.Ports.FAQ" to explain what is being done and
the pitfalls to watch out for.

> for instance: (concept, not correct implementation)

> multi_user = "syslog cron"
> network    = "syslog cron_net ifconfig named"

Yep. That works. The only problem is shutting things down, if you
are not simple shutting everything down.

Actually, at that point you'd need a matrix of what to stop and start 
depending upon what run-state you are going from and to.

All the more reason to go with linear run-levels.

> now i know that both use the same syslog start script
> and that they start cron differently.
> the order is explicit, not implicit ascii sort order

Yep. Alternately, the "cron" script can take an argument of "multi-user"
or "network" and do the right thing.

in summary, my druthers are:
>	one directory for all start and stop scripts
>	explicit invocation order, a list
>	one name per script regardless of run-state/level
>		(no links hard or soft)

Yep. I'll buy that for a dollar.

>	explicit names: Snamed (start.named, whatever)

Or two optional arguments to each script: the name of the run-state
or number of the run-level and "start"/"stop"/"restart". Even clearer.


> 	that both use a master file.  one exists as a file, the other 
> exists as an artifact of ascii sort order (not obvious to our poor 
> newbie, especially when we have to explain that 10 comes before 2). a 
> list of tasks/scripts is clearer to our newbie and easier for everyone else.

A master file, which generates a set of run-state script. The program
which generates the "rc.N" scripts (N being run-state #) check for
consistency (ie major screw-ups, possibly even dependencies) before
replacing the older "rc.N" file. All the scripts reside in /etc/init.d
and take a single argument of "start", "stop", or "restart".

Very similar to what is now being done for "daily"/"weekly".
Which I've already done, so could do this one just as easily.

-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?199509251402.KAA12092>