RCORDER(8)
π
RCORDER(8) β the rcorder girlies' guide
ok so bestie, welcome to rcorder from section 8 of the system manager's manual β she's the one who prints a dependency ordering of interdependent files, and honestly? she ate. π
β¨ NAME β¨
rcorder β print a dependency ordering of interdependent files π
π¦ SYNOPSIS π¦
rcorder [-gp] [-k keep] [-s skip] file ...
πΈ DESCRIPTION πΈ
okay so the rcorder utility is literally designed to print out a dependency ordering of a set of interdependent files. typically it's used to find an execution sequence for a set of shell scripts where certain files must be executed before others. it's giving backstage-pass energy, no cap. π₯
each file you pass to rcorder must be annotated with special lines β and yes, they look like comments to the shell, that's the whole vibe π β 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 these lines is rigid, bestie β like, no room for interpretation:
- each line must begin with a single
# - followed by a single space
- followed by
PROVIDE:,REQUIRE:,BEFORE:, orKEYWORD:
no deviation is permitted. periodt. π
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 with no intervening lines β because once a line that doesn't follow the format is reached, parsing stops. like, that's it, we're done here, the party's over. π
the options are as follows:
π OPTIONS π
-gβ produce a GraphViz (.dot) of the complete dependency graph instead of a plaintext calling order list. aesthetic AND functional, we love to see it. π¦-kkeep β add the specified keyword to the "keep list". if any-koption is given, only those files containing the matching keyword are listed. this option can be specified multiple times. π«Ά-pβ generate ordering suitable for parallel startup, placing files that can be executed simultaneously on the same line. multitasking queen behavior. β¨-sskip β add the specified keyword to the "skip list". if any-soption is given, files containing the matching keyword are not listed. this option can be specified multiple times. π ββοΈ
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. iconic, honestly.
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. but heads up bestie β οΈ β 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. someone's gotta go first, yk?
π KEYWORDS π
there are several KEYWORDs in use:
firstboot,nojail,nojailvnet,nostartβ used byrc(8).suspend,resumeβ used by/etc/rc.suspendand/etc/rc.resume(seeacpiconf(8)).shutdownβ used byrc.shutdown(8).
π EXAMPLES π
print the dependency ordering of the services from the base system and ports(7):
$ rcorder /etc/rc.d/* /usr/local/etc/rc.d/*
count the number of services in the base system which specify the nostart keyword, while skipping those with firstboot and nojailvnet:
$ rcorder -k nostart -s firstboot -s nojailvnet /etc/rc.d/* | wc -l
3
math girlies rise up π§
π DIAGNOSTICS π
the rcorder utility may print one of the following error messages and exit with a non-zero status if it encounters an error while processing the file list. π
Requirement %s in file %s has no providers.β no file has aPROVIDEline corresponding to a condition present in aREQUIREline in another file. somebody's missing their other half, tragic.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 the biggest counter when fighting with broken dependencies. like, biggest red flag first, basically. π©
π DIAGNOSTICS WITH GRAPHVIZ π
direct dependency is drawn with a solid line, BEFORE dependency is drawn as a dashed line. each node of a graph represents an item from PROVIDE lines. in case there are more than one file providing an item, a list of filenames shortened with basename(3) is shown. shortened filenames are also shown in case a PROVIDE item does not match the file name.
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 in bold red as well. red = drama = detected problems, slay. π₯
β SEE ALSO β
acpiconf(8), rc(8), rc.shutdown(8), service(8)
π¦ HISTORY π¦
the rcorder utility appeared in NetBSD 1.5. the rcorder utility first appeared in FreeBSD 5.0. she's been serving looks since the early 2000s, we stan a legacy icon. π
π AUTHORS π
written by Perry E. Metzger <perry@piermont.com> and Matthew R. Green <mrg@eterna.com.au>. absolute legends, fr fr. πΈ
π BUGS π
the REQUIRE keyword is misleading: it does not describe which daemons have to be running before a script will be started. it describes which scripts must be placed before it in the dependency ordering.
for example, if your script has a REQUIRE on sshd, it means the script must be placed after the sshd script in the dependency ordering β not necessarily that it requires sshd to be started or enabled. so like, don't come for her, she's just about ordering babes. π
ok that's the whole page bestie, go forth and order some dependencies π β¨
this cutie is from the Debian manual, dated June 10, 2023, and she lives at RCORDER(8) in the System Manager's Manual. mwah. π«Άπ
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 1998 Perry E. Metzger. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms