Date: Mon, 25 Sep 1995 16:58:08 -0400 From: Coranth Gryphon <gryphon@healer.com> To: gryphon@healer.com, terry@lambert.org Cc: hackers@FreeBSD.ORG, jmb@kryten.atinc.com, peter@taronga.com Subject: Re: ports startup scripts Message-ID: <199509252058.QAA13268@healer.com>
next in thread | raw e-mail | index | archive | help
From: Terry Lambert <terry@lambert.org> > > > It may also need to add a cron job to rotate the damons logs. > > > > rotate_log daily /some/log/file > What if I want to rotate them twice a week instead of daily? > What about twice a day? We don't have that granularity for anything else right now. If you wanted something with a different resolution, you couldn't do it with the daily/weekly stuff anyway. You could always make a cron job that did it, but the only way to do it is (A) edit crontab by hand or (B) have the install edit the crontab. Either way, it's just as complicated, and I only offered the simple solution that tacked onto the existing mechanism. You can always come up with a special case. But nobody has proposed a means for dealing with every special case. Just for the standard ones. > > > 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. :-) > The problem is that the line starts are not a fixed locations and are > therefore variant without whole file locking. Which is bad. So the whole file gets locked. I really can't see the case of multiple parallel package installs happening ** and hitting the "add one line to a file" step ** at the same time that frequently. > > > 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? > 1) How do I tell which line(s) correspond to which package? Whatever added the line better know which it is :-) If the package added it, and it's removing it, we're fine. If you added it by hand, then you can remove it just as easily. If you used an admin tool (gui-ish thing or shell script) to add it, then it can keep track of the name of the script. If the package added it but cannot delete it itself, then (1) it should have a coherent name (which makes the process trivial) or (2) you might have to grep (in the single directory) through the scripts to find out which line to comment out. > 2) How do I reenable it? Uncomment it? > 3) How do I do this from an administrative utility instead of > having to actually know what's what myself? All these default to #1. The admin tool can always refer to scripts by name if it doesn't know anything else about it (that is, if you think "apache.httpd" is much less informative than "Apache Web Server"). We're making the blatant assumption that the sys-admin doing the removing knows what they want to remove. Unless you want the admin tool itself making the decision of WHAT to remove. Sorry, the AI interface is not showing up until FreeBSD 3.0 :-) > > > Typically, I'd put the "cron" jobs as at commands in the startup script, > > > > As above, given that you have the granularity of "daily", "weekly", or > > "monthly". I suppose we could always add "bi-weekly" and "bi-monthy" :-/ > The question was in terms of specification by administrative fiat after > boot time. With a cron job, I can change the file and reset cron. With > an at job, I am pretty much screwed. OK, sorry. I missed the word "at" in the original comment by whoever. My point was again, if you wanted to use the normal scheduled-job mechanism (daily/weekly/monthly) you were limited to that granularity. If you want other frequencies, your options are either (1) do it not using that mechanism, or (2) enchance that mechanism to add other times. > The cron data files suffer from the same failings as the mondo-data-file > correspondance ambiguities: how do I correlate lines with administrative > actions on a package basis? Same answer. We name the job based upon (not the same as) the init script name. For example, the script name is "mumbled" (to start the "mumble" daemon). The daily job entry in the schedule file would be "DO_mumble") or you could create a seperate script called "mumble.daily". Or you do things by hand in cron, and deal with things by hand, since the script is refusing to conform to standard frequencies (every 2.5 days) or needs to do someting else weird (package named mumble cannot have a crontab entry with that word in it). Or don't use cron. > The problem is that the n:m mapping goes to hell rather quickly when it > becomes n:m:l mapping. Granted. If the names are different. So we come up with a standard. "mumble" is the init script. "DO_mumble" is the daily job entry. "mumble.weekly" is the additional script to be run weekly. If we are standardizing the process, then either (1) ports and packages conform to the standard (which we can control for those distributed as part of FreeBSD) or (2) they do not, in which case we document the simple process and fall back on the "If you are hand-installing ports, then you better either not be a newbie or better be able to follow directions". -coranth ------------------------------------------+------------------------+ Coranth Gryphon <gryphon@healer.com> | "Faith Manages." | | - Satai Delenn | Phone: 603-598-3440 Fax: 603-598-3430 +------------------------+ USMail: 3 Hansom Drive, Merrimack, NH 03054 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?199509252058.QAA13268>