summaryrefslogtreecommitdiffstats
path: root/man/do-diffs.1
blob: 97b96649be58ee4b276e4a238ef5c9617bc46793 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
.\"
.hys 50
.TH "do-diffs" "1" "13 Jan 2001"
.SH NAME
do-diffs \- run rancid for each of the groups
.SH SYNOPSIS
.B do-diffs
[\c
.BI \-m\ \c
mail_rcpt]\ \c
[\c
.BI \-r\ \c
device_name]\ \c
[group [group ...]]
.SH DESCRIPTION
.B do-diffs
is a
.IR sh (1)
script to run
.IR rancid (1)
for a set of rancid group(s).
.PP
.B do-diffs
reads
.BR env (5)
to configure itself, then uses
.IR control_rancid (1)
to run
.IR rancid (1)
for each rancid group.  The set of rancid groups can either be provided
as command-line arguments or via the
.I LIST_OF_GROUPS
variable in
.BR env (5),
if the group argument is omitted.
.PP
A lock file is maintained per-group to prevent simultaneous runs for a given
group by
.IR do-diffs (1).
The lock file will be named
.IR .<group>.run.lock
and will be located in
.IR $TMPDIR
(see below).
.PP
A log file is produced under
.IR $BASEDIR/logs
for each rancid group processed.  The file name will be <group>.YYYYMMDD.HHMMSS
(year month day . hour minute second).
.PP
.B do-diffs
is normally used to run rancid from
.BR cron (8).
For example:
.PP
.in +1i
.nf
0 * * * *      /usr/local/rancid/bin/do-diffs
.fi
.in -1i
.\"
.PP
.\"
The command-line options are as follows:
.TP
.B \-m mail_rcpt
Specify the recipient of diff mail, which is normally rancid-<group>.  The
argument may be a single address, multiple comma separated addresses, or
.B \-m
may be specified multiple times.
.\"
.TP
.B \-r device_name
Specify the name, as it appears in a group's router.db, of a particular
device to collect and generate diffs for.  The device must be marked "up".
If a group is not specified on the command-line, rancid will be run 
against any group in which the device_name appears.
.sp
The 
.B \-r
option alters the subject line of the diff mail.  It will begin
with <group name>/<device name> rather than just the group name alone.
.\"
.SH ENVIRONMENT
.B do-diffs
utilizes the following environment variables from
.BR env (5).
.\"
.TP
.B BASEDIR
Location of group directories, etc.
.\"
.TP
.B LIST_OF_GROUPS
List of rancid groups to collect.
.\"
.TP
.B PATH
Search path for utilities.
.\"
.TP
.B TMPDIR
Directory to hold temporary and lock files.
.SH ERRORS
If rancid fails to run or collect a device's configuration, the particular
group's log file (mentioned above) should be consulted.  Any errors produced
by
.BR cvs (1)
or any of the rancid scripts should be included, whether they be a botched
cvs tree, login authentication failure, rancid configuration error, etc.  If
the log file produces no clues, the next debugging step should be run the
commands manually.  For example, can the user who runs rancid login to the
device with 'clogin hostname', and so on.
.BR 
.SH FILES
.TP
.B $BASEDIR/bin/env
.B do-diffs
configuration file.
.El
.SH SEE ALSO
.BR control_rancid (1),
.BR router.db (5),
.BR env (5)