Changeset View
Standalone View
rcorder.8
Show All 25 Lines | |||||
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||||
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||||
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||||
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||||
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||||
.\" | .\" | ||||
.\" $FreeBSD$ | .\" $FreeBSD$ | ||||
.\" | .\" | ||||
.Dd October 27, 2018 | .Dd June 21, 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 k Ar keep | .Op Fl k Ar keep | ||||
.Op Fl s Ar skip | .Op Fl s Ar skip | ||||
.Op Fl g | |||||
0mp: Usually, flags without arguments are listed using one Fl macro before any other flags and… | |||||
.Op Fl p | |||||
.Ar | .Ar | ||||
.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 | ||||
Show All 15 Lines | |||||
.Dq Li BEFORE | .Dq Li BEFORE | ||||
and | and | ||||
.Dq Li KEYWORD | .Dq Li KEYWORD | ||||
lines must appear. | lines must appear. | ||||
The format of the lines is rigid. | The format of the lines is rigid. | ||||
Each line must begin with a single | Each line must begin with a single | ||||
.Ql # , | .Ql # , | ||||
followed by a single space, followed by | followed by a single space, followed by | ||||
.Dq Li PROVIDE: , | .Dq Li PROVIDE\&: , | ||||
.Dq Li REQUIRE: , | .Dq Li REQUIRE\&: , | ||||
.Dq Li BEFORE: , | .Dq Li BEFORE\&: | ||||
or | or | ||||
.Dq Li KEYWORD: . | .Dq Li KEYWORD\&: . | ||||
No deviation is permitted. | No deviation is permitted. | ||||
Each dependency line is then followed by a series of conditions, | Each dependency line is then followed by a series of conditions, | ||||
separated by whitespace. | separated by whitespace. | ||||
Multiple | Multiple | ||||
.Dq Li PROVIDE , | .Dq Li PROVIDE , | ||||
.Dq Li REQUIRE , | .Dq Li REQUIRE , | ||||
.Dq Li BEFORE | .Dq Li BEFORE | ||||
and | and | ||||
Show All 9 Lines | |||||
.Bl -tag -width indent | .Bl -tag -width indent | ||||
.It Fl k | .It Fl k | ||||
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. | ||||
.It Fl s | .It Fl s | ||||
Add the specified keyword to the | Add the specified keyword to the | ||||
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… | |||||
.Dq "skip list" . | .Dq "skip list" . | ||||
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… | |||||
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. | ||||
.It Fl g | |||||
0mpUnsubmitted 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
...
. | |||||
Produce a GraphViz (.dot) of the complete dependency graph instead of | |||||
plaintext calling order list. | |||||
.It Fl p | |||||
Generate ordering suitable for parallel startup placing files that can be | |||||
executed simultaneously on the same line. | |||||
Done Inline ActionsI think the "in" here is superfluous. bcr: I think the "in" here is superfluous. | |||||
.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 | ||||
# REQUIRE: usr | # REQUIRE: usr | ||||
# PROVIDE: dns nscd | # PROVIDE: dns nscd | ||||
.Ed | .Ed | ||||
Show All 36 Lines | |||||
.Xr rc.shutdown 8 . | .Xr rc.shutdown 8 . | ||||
.El | .El | ||||
.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 | ||||
.Dq Li PROVIDE | .Dq Li PROVIDE | ||||
line corresponding to a condition present in a | line corresponding to a condition present in a | ||||
.Dq Li REQUIRE | .Dq Li 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, | |||||
.Dq Li 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 | |||||
.Dq Li 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 | |||||
.Dq Li 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 | |||||
.Dq Li REQUIRE | |||||
Done Inline Actionss/Dq Li/Ql/ 0mp: s/Dq Li/Ql/ | |||||
or in | |||||
Done Inline Actionss/provirer/provider/ bcr: s/provirer/provider/ | |||||
.Dq Li 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 | ||||
.Sh HISTORY | .Sh HISTORY | ||||
The | The | ||||
.Nm | .Nm | ||||
utility appeared in | utility appeared in | ||||
Show All 29 Lines |
Usually, flags without arguments are listed using one Fl macro before any other flags and arguments: