Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Sep 1995 10:41:35 -0400
From:      Coranth Gryphon <gryphon@healer.com>
To:        jmb@kryten.atinc.com, terry@lambert.org
Cc:        hackers@FreeBSD.ORG, peter@taronga.com
Subject:   Re: ports startup scripts
Message-ID:  <199509251441.KAA12169@healer.com>

next in thread | raw e-mail | index | archive | help
From: Terry Lambert <terry@lambert.org>
> > 	same name == same script == same actions.

> Consider:  A package which requires a daemon to be run needs to add a
> startup and a shutdown script to the list of scripts to be executed.

That's why I've been advocating a single master file. It adds the script
to the startup script directory (we've been calling it "/etc/init/d") and
makes a one line addition to "inittab".

> It may also need to add a cron job to rotate the damons logs.

No. With the new "daily" script handler (Jordan, have you told anyone
else about this yet?) all it needs to do is add a line to the scheduled
jobs config file (current name "sched.conf" like:

	rotate_log	daily	/some/log/file

> The point of using seperate files is that the directory entry/deletion
> mechanism is arbitrated automatically, in the kernel, without the use of
> user level locks.

Granted. But I think it's still worth it for a control file.
It makes everything else simpler, and the kernel/file-system already
supports the "Nope you can't open this file for writing, someone else already
has it open for writing". (If it doesn't then it's a wonder everything
hasn't broken a lot already :-)

> Ordering guarantees within a single run level/state are hard to provide
> with the single monolithic file model.

Actually, a single file is the easiest to control ordering in.
Last I checked, line 1 always came before line 2. :-)

> Finally, what if I don't want to delete the package, I just want to
> disable it?  How to I prevent the package daemon's and cron jobs from

Comment out the line in the control file?

> Typically, I'd put the "cron" jobs as at commands in the startup script,
> though this begs the question of providing configurability under
> administrative control (for instance, what if I want to specify a higher
> or lower frequency of log rotation?).  Cron actually faces the same
> issues as init.

As above, given that you have the granularity of "daily", "weekly", or
"monthly". I suppose we could always add "bi-weekly" and "bi-monthy" :-/

-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?199509251441.KAA12169>