Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Sep 1995 09:46:58 -0400
From:      Coranth Gryphon <gryphon@healer.com>
To:        asami@cs.berkeley.edu, hackers@freebsd.org, ports@freebsd.org
Subject:   Re: ports startup scripts
Message-ID:  <199509201346.JAA20931@healer.com>

next in thread | raw e-mail | index | archive | help
> Well, now that Jordan started the fire and Paul has sprayed some
> gasoline onto it, let's see if we can resolve this one last time. :)

> I assume we all agree that we want something like

> for script in ${local_startup}/*.sh; do
>     [ -x ${script} ] && ${script} start
> done

> to be run from /etc/rc.  The question is, where do we want that
> "local_startup" directory to be?

> (1) /etc/rc.d

>  - Ports shouldn't touch anything in the root filesystem

Well, various things affect /var/.... and that is not always mounted
seperately. Heck, If /etc could be mounted seperately, I'd probably
be doing so...

>  + Central location, easy to maintain
>  + Per-machine configuration possible even if /usr/local is NFS shared

This is the option that I'd like to see. 

> So, if the user wants to change the "default" location of the "local"
> tree or the X tree, he can just edit /etc/sysconfig.

Possible, but that is one more set of things lumped into sysconfig.

> The porters should just make sure that the script for the port
> "<mumble>" has a name "<mumble>.sh" and it goes to ${PREFIX}/etc/rc.d.

Personally, I'd prefer to see them named "rc.<mumble>"

Alternately, I'd recommend one other options.

5) put them all in /etc/rc.ports

- yep, it touches /etc (but that's what it's for)
+ but no normal system files are being modified
+ one known location
+ easy to see what is being run where

> why don't we make it a guideline to try to make it understand arguments
> "start" and "stop", it may be useful in the future.

Great idea. There's a script I found somewhere (I forget) that I use all
the time. It's called "pkill" and what it does is just a PS and greps for
the process name to send it a specified signal. Yeah I know, easy to do.

But adding something like to that to the base dist would (1) make people
happy, (2) eliminate some of the need for /var/run/*.pid and (3) make
the start scripts easier to implement more generically.

> May I have your comments, ladies and gentlemen?

On one other note, making all of the /etc normal startup scripts
either (1) start with "rc." (like rc.netstart and rc.sysconfig)
or moving them also to "/etc/rc.d".

It makes tracking down where something is defined MUCH easier to
be able to just grep through "/etc/rc*" than to have to figure
out (or keep in your head if > 5 files :-) what else to look at.

-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?199509201346.JAA20931>