From owner-freebsd-hackers Mon Sep 25 08:13:33 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id IAA13659 for hackers-outgoing; Mon, 25 Sep 1995 08:13:33 -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 IAA13652 for ; Mon, 25 Sep 1995 08:13:08 -0700 Received: (from gryphon@localhost) by healer.com (8.6.11/8.6.9.1) id KAA12169; Mon, 25 Sep 1995 10:41:35 -0400 Date: Mon, 25 Sep 1995 10:41:35 -0400 From: Coranth Gryphon Message-Id: <199509251441.KAA12169@healer.com> To: jmb@kryten.atinc.com, terry@lambert.org Subject: Re: ports startup scripts Cc: hackers@FreeBSD.ORG, peter@taronga.com Sender: owner-hackers@FreeBSD.ORG Precedence: bulk From: Terry Lambert > > 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 | "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...