From owner-freebsd-hackers Sun Jan 11 17:05:13 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.7/8.8.7) id RAA28471 for hackers-outgoing; Sun, 11 Jan 1998 17:05:13 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from post.mail.demon.net (post-20.mail.demon.net [194.217.242.27]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id RAA28438 for ; Sun, 11 Jan 1998 17:04:57 -0800 (PST) (envelope-from dmlb@ragnet.demon.co.uk) Received: from ragnet.demon.co.uk ([158.152.46.40]) by post.mail.demon.net id aa2018468; 12 Jan 98 0:59 GMT Received: from dmlb by ragnet.demon.co.uk with local (Exim 1.73 #1) id 0xrXt3-0006YC-00; Mon, 12 Jan 1998 00:37:53 +0000 Message-ID: X-Mailer: XFMail 1.1 [p0] on FreeBSD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Date: Mon, 12 Jan 1998 00:27:01 -0000 (GMT) From: Duncan Barclay To: freebsd-hackers@FreeBSD.ORG Subject: Re: Revamping /etc/daily, weekly, monthly Cc: Nate Williams Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk Stuff from a couple of weeks ago to jog your memories: On 31-Dec-97 Duncan Barclay wrote: > >On 31-Dec-97 Nate Williams wrote: >>[ Duncan Barclay writes: >>> For some while I have been unhappy with the way the daily/weekly/monthly >>> scripts work. >> >>... >>> The nicest way to configure is probably a file a la newsyslog.conf >>> eg. >>> # >>> # Cleaner job When [Boot] >>> # >>> build_whatis w n >>> build_locate w n >>> remove_junk d y >>... >>[ Good proposal deleted ] >> >>> So before I embark on setting this up, any thoughts/comments to >>> improve upon this? >I've started to throw together the first cut and already started using real >words. Keeping it simple at the moment I am using >build_whatis= daily|weekly|monthly|boot >build_whatis_boot= yes|no > >Oh yeah, the working title is "bev", after our cleaner:-) Well I have finsihed the first cut of bev and its available from http://www.ragnet.demon.co.uk/bev.tar.gz unpack this and then dump the files in /etc, and change the /etc/crontab file as directed. Local files can be set-up without hacking on bev itself. Examples of bev.conf.local and bev.local are provided. I haven't implemented any of the extras to cron to enable catching up of missed runs. From earlier discussions that is really orthogonal to what I am trying to do. If bev seems to be the right sort of thing can someone commit it? WARNING: I have only run this unattended once it seems fine...:-) The configuration is in the style of rc.conf. Snippet from bev.conf # # Configuration for bev, the system cleaner. This file # is read into a shell script. # # Each pair of variables determines when an action is run. The # first variable can take any value, the action is executed # if bev is invoked with that value as its first argument. # The second variable (with the _boot suffix) can be used to invoke # an action at boot time. # # Eg. # # clean_var.preserve="daily" # clean_var.preserve_boot="yes" # # invokes an action to clean up /var/preserve when bev is run as # /etc/bev daily. Also the clean up is run when the machine is booted. # # Typical values for when an action is to be run are: # daily weekly monthly boot none local # The first three are used by cron(1) invoked runs of bev. "boot" is # used to invoke bev from /etc/rc and "none" is used if bev is invoked # with no arguments. The _boot variables should be set to one of # yes no # clean_var_preserve="daily" clean_var_preserve_boot="yes" clean_var_rhwo="daily" clean_var_rwho_boot="yes" Duncan --- ________________________________________________________________________ Duncan Barclay | God smiles upon the little children, dmlb@ragnet.demon.co.uk | the alcoholics, and the permanently stoned. ________________________________________________________________________