Changeset View
Standalone View
rcorder.8
Show All 33 Lines | |||||
.Dd June 22, 2020 | .Dd June 22, 2020 | ||||
.Dt RCORDER 8 | .Dt RCORDER 8 | ||||
.Os | .Os | ||||
.Sh NAME | .Sh NAME | ||||
.Nm rcorder | .Nm rcorder | ||||
.Nd print a dependency ordering of interdependent files | .Nd print a dependency ordering of interdependent files | ||||
.Sh SYNOPSIS | .Sh SYNOPSIS | ||||
.Nm | .Nm | ||||
.Op Fl gp | |||||
.Op Fl k Ar keep | .Op Fl k Ar keep | ||||
.Op Fl s Ar skip | .Op Fl s Ar skip | ||||
.Ar | .Ar | ||||
0mp: Usually, flags without arguments are listed using one Fl macro before any other flags and… | |||||
.Sh DESCRIPTION | .Sh DESCRIPTION | ||||
The | The | ||||
.Nm | .Nm | ||||
utility is designed to print out a dependency ordering of a set of | utility is designed to print out a dependency ordering of a set of | ||||
interdependent files. | interdependent files. | ||||
Typically it is used to find an execution | Typically it is used to find an execution | ||||
sequence for a set of shell scripts in which certain files must be | sequence for a set of shell scripts in which certain files must be | ||||
executed before others. | executed before others. | ||||
Show All 37 Lines | |||||
any intervening lines, as once a line that does not follow the format | any intervening lines, as once a line that does not follow the format | ||||
is reached, parsing stops. | is reached, parsing stops. | ||||
.\" Note that for historical reasons REQUIRES, PROVIDES, and KEYWORDS | .\" Note that for historical reasons REQUIRES, PROVIDES, and KEYWORDS | ||||
.\" are also accepted in addition to the above, but not documented so | .\" are also accepted in addition to the above, but not documented so | ||||
.\" that they can be deprecated at some point in the future. | .\" that they can be deprecated at some point in the future. | ||||
.Pp | .Pp | ||||
The options are as follows: | The options are as follows: | ||||
.Bl -tag -width "-k keep" | .Bl -tag -width "-k keep" | ||||
.It Fl g | |||||
Produce a GraphViz (.dot) of the complete dependency graph instead of | |||||
plaintext calling order list. | |||||
.It Fl k Ar keep | .It Fl k Ar keep | ||||
Add the specified keyword to the | Add the specified keyword to the | ||||
.Dq "keep list" . | .Dq "keep list" . | ||||
If any | If any | ||||
.Fl k | .Fl k | ||||
option is given, only those files containing the matching keyword are listed. | option is given, only those files containing the matching keyword are listed. | ||||
This option can be specified multiple times. | This option can be specified multiple times. | ||||
.It Fl p | |||||
Generate ordering suitable for parallel startup, placing files that can be | |||||
Done Inline ActionsI think this reads slightly better with a comma: Generate ordering suitable for parallel startup, placing files that can be rpokala: I think this reads slightly better with a comma:
```
Generate ordering suitable for parallel… | |||||
executed simultaneously on the same line. | |||||
Done Inline ActionsThis comment is not about the man page change, but about the actual option. This way the rc infrastructure would be able to start new script(s) as soon as a requirement is satisfied. Of course, this can be done as a future improvement. If needed. avg: This comment is not about the man page change, but about the actual option.
It's better than… | |||||
Done Inline ActionsThis interactive mode can be easily added as generate_ordering() now emits scripts exactly in the way you want them to to appear. lytboris_gmail.com: This interactive mode can be easily added as generate_ordering() now emits scripts exactly in… | |||||
.It Fl s Ar skip | .It Fl s Ar skip | ||||
Add the specified keyword to the | Add the specified keyword to the | ||||
.Dq "skip list" . | .Dq "skip list" . | ||||
If any | If any | ||||
.Fl s | .Fl s | ||||
option is given, files containing the matching keyword are not listed. | option is given, files containing the matching keyword are not listed. | ||||
This option can be specified multiple times. | This option can be specified multiple times. | ||||
Done Inline ActionsIt would be great if we could keep the list sorted .It Fl g ... .It Fl k ... .It Fl p ... .It Fl s 0mp: It would be great if we could keep the list sorted
```
.It Fl g
...
.It Fl k
...
.It Fl p
...
. | |||||
.El | .El | ||||
.Pp | .Pp | ||||
An example block follows: | An example block follows: | ||||
.Bd -literal -offset indent | .Bd -literal -offset indent | ||||
# REQUIRE: networking syslog | # REQUIRE: networking syslog | ||||
Done Inline ActionsI think the "in" here is superfluous. bcr: I think the "in" here is superfluous. | |||||
# REQUIRE: usr | # REQUIRE: usr | ||||
# PROVIDE: dns nscd | # PROVIDE: dns nscd | ||||
.Ed | .Ed | ||||
.Pp | .Pp | ||||
This block states that the file in which it appears depends upon the | This block states that the file in which it appears depends upon the | ||||
.Ql networking , | .Ql networking , | ||||
.Ql syslog , | .Ql syslog , | ||||
and | and | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | $ rcorder -k nostart -s firstboot -s nojailvnet /etc/rc.d/* | wc -l | ||||
3 | 3 | ||||
.Ed | .Ed | ||||
.Sh DIAGNOSTICS | .Sh DIAGNOSTICS | ||||
The | The | ||||
.Nm | .Nm | ||||
utility may print one of the following error messages and exit with a non-zero | 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. | status if it encounters an error while processing the file list. | ||||
.Bl -diag | .Bl -diag | ||||
.It "Requirement %s has no providers, aborting." | .It "Requirement %s in file %s has no providers." | ||||
No file has a | No file has a | ||||
.Ql PROVIDE | .Ql PROVIDE | ||||
line corresponding to a condition present in a | line corresponding to a condition present in a | ||||
.Ql REQUIRE | .Ql REQUIRE | ||||
line in another file. | line in another file. | ||||
.It "Circular dependency on provision %s, aborting." | .It "Circular dependency on provision %s in file %s." | ||||
A set of files has a circular dependency which was detected while | A set of files has a circular dependency which was detected while | ||||
processing the stated condition. | processing the stated condition. | ||||
.It "Circular dependency on file %s, aborting." | Loop visualization follows this message. | ||||
.It "Circular dependency on file %s." | |||||
Done Inline ActionsA line break is needed after a sentence stop. bcr: A line break is needed after a sentence stop. | |||||
A set of files has a circular dependency which was detected while | A set of files has a circular dependency which was detected while | ||||
processing the stated file. | processing the stated file. | ||||
.It "%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. | |||||
Done Inline ActionsAnother line break is needed here. bcr: Another line break is needed here. | |||||
Start with files having biggest counter when fighting with broken dependencies. | |||||
.El | .El | ||||
.Sh DIAGNOSTICS WITH GRAPHVIZ | |||||
Direct dependency is drawn with solid line, | |||||
.Ql BEFORE | |||||
Done Inline Actionss/Dq Li/Ql/ 0mp: s/Dq Li/Ql/ | |||||
dependency is drawn as a dashed line. | |||||
Each node of a graph represents an item from | |||||
.Ql PROVIDE | |||||
Done Inline ActionsSentence stop = line break. bcr: Sentence stop = line break. | |||||
Done Inline Actionss/Dq Li/Ql/ 0mp: s/Dq Li/Ql/ | |||||
lines. | |||||
In case there are more than one file providing an item, a list of filenames | |||||
shortened with | |||||
Done Inline Actions... and another one here. bcr: ... and another one here. | |||||
.Xr basename 3 | |||||
is shown. | |||||
Shortened filenames are also shown in case | |||||
.Ql PROVIDE | |||||
Done Inline Actionss/Dq Li/Ql/ 0mp: s/Dq Li/Ql/ | |||||
item does not match file name. | |||||
.Pp | |||||
Edges and nodes where circular dependencies were detected are drawn bold red. | |||||
If a file has an item in | |||||
.Ql REQUIRE | |||||
Done Inline Actionss/Dq Li/Ql/ 0mp: s/Dq Li/Ql/ | |||||
or in | |||||
Done Inline Actionss/provirer/provider/ bcr: s/provirer/provider/ | |||||
.Ql BEFORE | |||||
Done Inline Actionss/Dq Li/Ql/ 0mp: s/Dq Li/Ql/ | |||||
that could not be provided, | |||||
this missing provider and the requirement will be drawn bold red as well. | |||||
.Sh SEE ALSO | .Sh SEE ALSO | ||||
.Xr acpiconf 8 , | .Xr acpiconf 8 , | ||||
.Xr rc 8 , | .Xr rc 8 , | ||||
.Xr rc.shutdown 8 , | .Xr rc.shutdown 8 , | ||||
.Xr service 8 | .Xr service 8 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
The | The | ||||
.Nm | .Nm | ||||
Show All 30 Lines |
Usually, flags without arguments are listed using one Fl macro before any other flags and arguments: