Do not print out error messages in quiet mode to make shell scriptiong
[dragonfly.git] / sbin / rcorder / rcorder.8
CommitLineData
9c600e7d
MD
1.\" $NetBSD: rcorder.8,v 1.3 2000/07/17 14:16:22 mrg Exp $
2.\" $DragonFly: src/sbin/rcorder/rcorder.8,v 1.1 2003/07/24 06:35:38 dillon Exp $
3.\"
4.\" Copyright (c) 1998
5.\" Perry E. Metzger. All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\" notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\" notice, this list of conditions and the following disclaimer in the
14.\" documentation and/or other materials provided with the distribution.
15.\" 3. All advertising materials mentioning features or use of this software
16.\" must display the following acknowledgment:
17.\" This product includes software developed for the NetBSD Project
18.\" by Perry E. Metzger.
19.\" 4. The name of the author may not be used to endorse or promote products
20.\" derived from this software without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32.\"
33.\" $FreeBSD: src/sbin/rcorder/rcorder.8,v 1.3 2002/11/25 16:23:03 ru Exp $
34.\"
35.Dd July 17, 2000
36.Dt RCORDER 8
37.Os
38.Sh NAME
39.Nm rcorder
40.Nd print a dependency ordering of interdependent files
41.Sh SYNOPSIS
42.Nm
43.Op Fl k Ar keep
44.Op Fl s Ar skip
45.Ar
46.Sh DESCRIPTION
47The
48.Nm
49utility is designed to print out a dependency ordering of a set of
50interdependent files.
51Typically it is used to find an execution
52sequence for a set of shell scripts in which certain files must be
53executed before others.
54.Pp
55Each file passed to
56.Nm
57must be annotated with special lines (which look like comments to the
58shell) which indicate the dependencies the files have upon certain
59points in the sequence, known as
60.Dq conditions ,
61and which indicate, for each file, which
62.Dq conditions
63may be expected to be filled by that file.
64.Pp
65Within each file, a block containing a series of
66.Dq Li REQUIRE ,
67.Dq Li PROVIDE ,
68.Dq Li BEFORE
69and
70.Dq Li KEYWORD
71lines must appear.
72The format of the lines is rigid.
73Each line must begin with a single
74.Ql # ,
75followed by a single space, followed by
76.Dq Li PROVIDE: ,
77.Dq Li REQUIRE: ,
78.Dq Li BEFORE: ,
79or
80.Dq Li KEYWORD: .
81No deviation is permitted.
82Each dependency line is then followed by a series of conditions,
83separated by whitespace.
84Multiple
85.Dq Li PROVIDE ,
86.Dq Li REQUIRE ,
87.Dq Li BEFORE
88and
89.Dq Li KEYWORD
90lines may appear, but all such lines must appear in a sequence without
91any intervening lines, as once a line that does not follow the format
92is reached, parsing stops.
93.Pp
94The options are as follows:
95.Bl -tag -width indent
96.It Fl k
97Add the specified keyword to the
98.Dq "keep list" .
99If any
100.Fl k
101option is given, only those files containing the matching keyword are listed.
102.It Fl s
103Add the specified keyword to the
104.Dq "skip list" .
105If any
106.Fl s
107option is given, files containing the matching keyword are not listed.
108.El
109.Pp
110 An example block follows:
111.Bd -literal -offset indent
112# REQUIRE: networking syslog
113# REQUIRE: usr
114# PROVIDE: dns nscd
115.Ed
116.Pp
117This block states that the file in which it appears depends upon the
118.Dq Li networking ,
119.Dq Li syslog ,
120and
121.Dq Li usr
122conditions, and provides the
123.Dq Li dns
124and
125.Dq Li nscd
126conditions.
127.Pp
128A file may contain zero
129.Dq Li PROVIDE
130lines, in which case it provides no conditions, and may contain zero
131.Dq Li REQUIRE
132lines, in which case it has no dependencies.
133There must be at least one file with no dependencies in the set of
134arguments passed to
135.Nm
136in order for it to find a starting place in the dependency ordering.
137.Sh DIAGNOSTICS
138The
139.Nm
140utility may print one of the following error messages and exit with a non-zero
141status if it encounters an error while processing the file list.
142.Bl -diag
143.It "Requirement %s has no providers, aborting."
144No file has a
145.Dq Li PROVIDE
146line corresponding to a condition present in a
147.Dq Li REQUIRE
148line in another file.
149.It "Circular dependency on provision %s, aborting."
150A set of files has a circular dependency which was detected while
151processing the stated condition.
152.It "Circular dependency on file %s, aborting."
153A set of files has a circular dependency which was detected while
154processing the stated file.
155.El
156.Sh SEE ALSO
157.Xr rc 8
158.Sh HISTORY
159The
160.Nm
161utility first appeared in
162.Nx 1.5 .
163.Sh AUTHORS
164.An -nosplit
165Written by
166.An Perry E. Metzger Aq perry@piermont.com
167and
168.An Matthew R. Green Aq mrg@eterna.com.au .