Date: Sat, 23 Sep 1995 10:45:18 -0400 From: Coranth Gryphon <gryphon@healer.com> To: hackers@freebsd.org, peter@taronga.com Subject: Re: ports startup scripts Message-ID: <199509231445.KAA07713@healer.com>
next in thread | raw e-mail | index | archive | help
From: peter@taronga.com (Peter da Silva) > +> But keeping a set of directories for the sole purpose of linking > +> to one common directory is hellishly redundant. > It's just like /usr/share/zoneinfo. Yep, which I immmediately delete as a link and copy the correct file in place. For this very reason. > And no, it's not "hellishly redundant". It's actually very convenient. Much > more so than referencing via a file: What I mean was "redundant" is having one directory being a mirror of the other. I honestly can't see what is gained. Either you just put everything in specific directory you want it to be in, or put it in one common directory. Not both. > + Adding or deleting a script can be done without editing a file. If you want things to be in one directory, and not have a config file, then name the startup scripts based on level. Thus: NNfoo.# Where NN is done for ordering, and # is the run level associated with it. > And the benefit over just having the run-level directories is it makes > it convenient to start up or shut down a single service. SVR2 didn't I have no problem with a single directory. I just don't see the need for mirroring from one directory to another on the same machine. > +> Original issue: What do we allow ports and packages to modify? > Answer: We let them put a file in a directory. Yep, sounds good to me. The only problem here is making sure the NN (for ordering) is handled correctly. > +> 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". > You may need separate start and stop entries because the order of execution > may be important and not always obvious. Putting start and stop in the same > directory is nice, but make sure you run the stops in reverse order at least. No. I was saying one script per service, that accept (and do the right thing) based upon a single command line argument ("start", "stop", "restart"). Yes, then going up run them from lowest to highest order number, when going down from highest to lowest. This should be relatively simple to implement. To decide upon an init procedure, we need to make two decisons before anything else. First, do we want run-levels or run-states? Second, do we want a control file, or just scripts in a directory? The only thing I have a real strong opinion on is that run-levels are a lot cleaner and simpler (and just as useful in most cases). That and don't implement both one directory per level AND one common directory. Pick one or the other. -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?199509231445.KAA07713>