Subject: FreeBSD's "periodic" script.
To: None <tech-userlevel@netbsd.org>
From: Chris Jones <chris@cjones.org>
List: tech-userlevel
Date: 03/06/2000 17:24:04
--=-=-=
This is a message from a friend of mine, describing a feature of
FreeBSD that sounds quite useful. As he does an excellent job of
explaining why it's useful, I'll let you all read his words.
If there's consensus on this, I'd be willing to do the work of
bringing it into NetBSD.
Chris
--=-=-=
Content-Type: message/rfc822
Content-Disposition: inline
by rupert.honors.montana.edu (8.9.3/8.9.3) with ESMTP id QAA27148
for <root@honors.montana.edu>; Mon, 6 Mar 2000 16:22:05 -0700 (MST)
Date: Mon, 6 Mar 2000 16:22:05 -0700 (MST)
From: Aaron Benner <benwah@honors.montana.edu>
To: "Rupert's root" <root@honors.montana.edu>
Subject: FreeBSD's "periodic" script.
Message-ID: <Pine.NEB.4.21.0003061610001.27098-100000@rupert.honors.montana.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
All,
I don't know if you'd be interested in this, or if it's something in
-current for NetBSD, but FreeBSD has taken the root 'daily/weekly/monthly'
reports and wrapped them in a format similar to SysV's init/rc.d
tree. Basically you've got a script 'periodic' and a directory tree
/etc/periodic/{daily|weekly|monthly} which houses scripts named according
to a standard of {xxx}foo where xxx is an integer that determines the
order in which scripts get executed. When periodic runs it expects an
argument that matches a directory name (you can set an environment
variable local_periodic that expands it's search tree) where it should
look for scripts to run. The master script pipes subscript stdout back up
it's stdout so it *looks* like you're running one of the big old
daily/weekly/monthly scripts with the important advantage of flexibility,
expandability and robustness (one failed subscript doesn't kill the
periodic job). I've got a tarball of the 3.4-RELEASE version of
etc/periodic and usr/sbin/periodic in my home direcotry if the current
rootly powers would like to look at them for curiousity's sake. In my
opinion this represents a very good sysadmin paradigm in that the
implementation allows for multiple architectures, easy expandability and
it's just plain spiffy.
(Think; /etc/periodic/security for a warehouse of security related scripts
a'la cops/tripwire/crack, or /<export>/periodic as a common nfs mounted
area to run system maintainence scripts, all with a simple frontend that
lets you define and export a collection of important environment variables
from a secure central server...)
------------------------------------------------------------------------------
"Mom, romance is dead. It was acquired in a hostile takeover by Hallmark and
Disney, homogenized, then sold off piece by piece." --Lisa Simpson
------- benwah@honors.montana.edu -- http://honors.montana.edu/~benwah -------
--=-=-=
--
-----------------------------------------------------chris@cjones.org
Chris Jones cjones@honors.montana.edu
Mad scientist at large
"Is this going to be a stand-up programming session, sir, or another bug hunt?"
--=-=-=--