Main index | Section 8 | 日本語 | Options |
Each file passed to rcorder must be annotated with special lines (which look like comments to the shell) which indicate the dependencies the files have upon certain points in the sequence, known as "conditions", and which indicate, for each file, which "conditions" may be expected to be filled by that file.
Within each file, a block containing a series of ‘REQUIRE’, ‘PROVIDE’, ‘BEFORE’ and ‘KEYWORD’ lines must appear. The format of the lines is rigid. Each line must begin with a single ‘#’, followed by a single space, followed by ‘PROVIDEamp;:’, ‘REQUIREamp;:’, ‘BEFOREamp;:’, or ‘KEYWORDamp;:’. No deviation is permitted. Each dependency line is then followed by a series of conditions, separated by whitespace. Multiple ‘PROVIDE’, ‘REQUIRE’, ‘BEFORE’ and ‘KEYWORD’ lines may appear, but all such lines must appear in a sequence without any intervening lines, as once a line that does not follow the format is reached, parsing stops.
The options are as follows:
| |
Produce a GraphViz (.dot) of the complete dependency graph instead of plaintext calling order list. | |
| |
Add the specified keyword to the
"keep list".
If any
| |
| |
Generate ordering suitable for parallel startup, placing files that can be executed simultaneously on the same line. | |
| |
Add the specified keyword to the
"skip list".
If any
| |
An example block follows:
# REQUIRE: networking syslog # REQUIRE: usr # PROVIDE: dns nscd
This block states that the file in which it appears depends upon the ‘networking’, ‘syslog’, and ‘usr’ conditions, and provides the ‘dns’ and ‘nscd’ conditions.
A file may contain zero ‘PROVIDE’ lines, in which case it provides no conditions, and may contain zero ‘REQUIRE’ lines, in which case it has no dependencies. There must be at least one file with no dependencies in the set of arguments passed to rcorder in order for it to find a starting place in the dependency ordering.
firstboot, nojail, nojailvnet, nostart | |
Used by rc(8). | |
resume | Used by /etc/rc.resume (see acpiconf(8)) |
shutdown | |
Used by rc.shutdown(8). | |
$ rcorder /etc/rc.d/* /usr/local/etc/rc.d/*
Count the number of services in the base system, which specify the shutdown keyword, while skipping those with firstboot and nojailvnet:
$ rcorder -k nostart -s firstboot -s nojailvnet /etc/rc.d/* | wc -l 3
Requirement %s in file %s has no providers. | No file has a ‘PROVIDE’ line corresponding to a condition present in a ‘REQUIRE’ line in another file. |
Circular dependency on provision %s in file %s. | A set of files has a circular dependency which was detected while processing the stated condition. Loop visualization follows this message. |
Circular dependency on file %s. | A set of files has a circular dependency which was detected while processing the stated file. |
%s was seen in circular dependencies for %d times. | Each node that was a part of circular dependency loops reports total number of such encounters. Start with files having biggest counter when fighting with broken dependencies. |
Edges and nodes where circular dependencies were detected are drawn bold red. If a file has an item in ‘REQUIRE’ or in ‘BEFORE’ that could not be provided, this missing provider and the requirement will be drawn bold red as well.
RCORDER (8) | September 8, 2020 |
Main index | Section 8 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | Ken Thompson has an automobile which he helped design. Unlike most automobiles, it has neither speedometer, nor gas gauge, nor any of the other numerous idiot lights which plague the modern driver. Rather, if the driver makes a mistake, a giant “?” lights up in the center of the dashboard. “The experienced driver,” says Thompson, “will usually know what's wrong.” | ” |