DNS Magic: cronjobs
The lastest version of this page can be found at:
The following list describes some of the standard modules provided for
automating DNS updates. Not all are specific to
DNS Magic. Note that we do not install
many of these by default as every site has their own thoughts on what
they do or do not want to automate.
The .list files mentioned refer to the configs(8) list that installs
the file. If no .list is mentioned the file is not installed
automagically and needs to be manually created (or a local .list file
created) if desired. See configs(8) for details.
- cronjob.list: Standard OS setup. cronjob.list, is included
- cronjob.list: Just
sets a suitable PATH
- cronjob.list: Sets up environment such that all
output can be collected and e-mailed to admin (see mailrep.sh)
- dnsmagic-cronjob.list: This is not included
with DNSMagic but will be installed if it can be found under
(eg. /configs/local/usr/local/share/dns/cron.d/lsetup.sh) and is a good
place to set WORK_DIR to where you want DNS cron jobs to play.
It goes without saying that WORK_DIR must exist and must contain a
checked out copy of the DNS repository.
- dnsmagic-cronjob.list: Provides interlocking between
- cd's to WORK_DIR, ensures there is a private temp directory and
- dnsmagic-cronjob.list: Makes sure that WORK_DIR has an up to date
copy of the DNS repository.
- Used in the hourly cronjob to handle one off scheduled changes.
Basically it processes any files named for the current year month day
and hour and renames them such that they will not be processed again
even if atjobs is run multiple times in the same
hour. The processing is handled in the same was as
- dnsmagic-updrevs.list: Commits changes made so far. This is
necessary for updrevs to do its job accurately. dnsmagic-updrevs.list
- This is the job that updates the live DNS directory and reloads or
bounces the live named if needed. It is performed as part of
S85updrevs, so only one of these jobs need be run. While
/etc/rc_d/dnsmagic is always installed, the link to S82dnsmagic is not
and must be manually made by sites that actually want this degree of
- dnsmagic-updrevs.list: This job is the main event.
It updates the live tree with the just committed changes (unless
.nomagic is present in WORK_DIR), and bounces named(8) if needed. It
then runs getdb to get
named(8) to dump its cache and then format it using
Finally it runs updrev to generate
any missing PTR records for networks that the nameserver is
- dnsmagic-cronjob.list: Records the changes made by
- dnsmagic-cronjob.list: Commits any changes (eg. made by
- dnsmagic-updrevs.list: This is the job that updates
the live DNS directory and reloads or bounces the live named if needed.
- cronjob.list: E-mails the report to admin, a copy
will also be kept in WORK_DIR called hourly.rep for the hourly cron job.
$Id: cron.html,v 1.10 2001/08/30 07:48:42 sjg Exp $
1997-2001 Simon J. Gerraty