Page MenuHomeFreeBSD

rc.suspend: update man pages for new keyword
ClosedPublic

Authored by jo_bruelltuete.com on Jun 10 2023, 2:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 3:12 PM
Unknown Object (File)
Mar 17 2024, 6:17 PM
Unknown Object (File)
Mar 17 2024, 6:16 PM
Unknown Object (File)
Mar 17 2024, 6:16 PM
Unknown Object (File)
Mar 15 2024, 7:50 AM
Unknown Object (File)
Mar 15 2024, 7:50 AM
Unknown Object (File)
Mar 15 2024, 7:37 AM
Unknown Object (File)
Jan 4 2024, 7:19 PM

Details

Summary

rc.suspend has gained an rcorder keyword recently. Document it alongside the existing resume keyword.

Test Plan

renders as:

RCORDER(8)              FreeBSD System Manager's Manual             RCORDER(8)

NAME
     rcorder – print a dependency ordering of interdependent files

SYNOPSIS
     rcorder [-gp] [-k keep] [-s skip] file ...

DESCRIPTION
     The rcorder utility is designed to print out a dependency ordering of a
     set of interdependent files.  Typically it is used to find an execution
     sequence for a set of shell scripts in which certain files must be
     executed before others.

     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 ‘PROVIDE:’, ‘REQUIRE:’, ‘BEFORE:’, or ‘KEYWORD:’.  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:

     -g       Produce a GraphViz (.dot) of the complete dependency graph
              instead of plaintext calling order list.

     -k keep  Add the specified keyword to the “keep list”.  If any -k option
              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.

     -s skip  Add the specified keyword to the “skip list”.  If any -s option
              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.

     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.

KEYWORDS
     There are several KEYWORDs in use:

           firstboot, nojail, nojailvnet, nostart
                     Used by rc(8).

           suspend, resume
                     Used by /etc/rc.suspend and /etc/rc.resume (see
                     acpiconf(8))

           shutdown  Used by rc.shutdown(8).

EXAMPLES
     [...restsnip unchanged...]

and:

ACPICONF(8)             FreeBSD System Manager's Manual            ACPICONF(8)

NAME
     acpiconf – control ACPI power management

SYNOPSIS
     acpiconf [-h] [-i batt] [-k ack] [-s type]

DESCRIPTION
     The acpiconf utility allows the user control of the ACPI power management
     functions.  The following command-line options are recognized:

     -h             Displays a summary of available options.

     -i batt        Get design information and current status of the battery
                    specified by its number, starting with 0.

     -k ack         Ack or abort a pending suspend request using the argument
                    provided.  Most users should not use this option directly.

     -s type        Enters the specified sleep mode.  Recognized types are 1
                    (only the CPU clock is stopped), 2 (not implemented on
                    most systems but similar to S1), 3 (the CPU context is
                    lost and memory context is preserved), and 4 (the CPU
                    context is lost and memory context is stored to disk).
                    Sleep states may also be given as S1, S2, etc.  The
                    supported states depend on BIOS implementation, including
                    ACPI byte code (AML).  If the /etc/rc.suspend and
                    /etc/rc.resume scripts are executable, they will be run by
                    devd(8) before and after entering the given sleep state.

                    The /etc/rc.suspend and /etc/rc.resume scripts use the
                    rcorder(8) utility to call scripts in /etc/rc.d/ and the
                    $local_startup directories that have a "suspend" or
                    "resume" KEYWORD, respectively.  Called scripts are
                    supplied with a single "suspend" / "resume" command line
                    argument.  See rc.conf(5) for more information about
                    $local_startup.

SEE ALSO
     acpi(4), rc.conf(5), acpidump(8), apm(8), devd(8), rcorder(8)

HISTORY
     The acpiconf utility appeared in FreeBSD 5.0.

AUTHORS
     The acpiconf utility was written by Mitsuru Iwasaki
     <iwasaki@FreeBSD.org>.  This manual page was written by Dag-Erling
     Smørgrav <des@FreeBSD.org>.

FreeBSD 13.2-STABLE              June 13, 2023             FreeBSD 13.2-STABLE

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jo_bruelltuete.com added inline comments.
usr.sbin/acpi/acpiconf/acpiconf.8
102

apmd is gone

103

mandoc-linter complained about order if rc.conf in this list.

mhorne added reviewers: manpages, rc.
mhorne added a subscriber: mhorne.

LGTM

This revision is now accepted and ready to land.Jun 10 2023, 2:25 PM
pauamma_gundo.com added inline comments.
usr.sbin/acpi/acpiconf/acpiconf.8
94

While touching this line.

This revision now requires review to proceed.Jun 12 2023, 11:11 PM

thanks for review

usr.sbin/acpi/acpiconf/acpiconf.8
94

well spotted!

English LGTM now. Can't attest to consistency with source code.

This revision is now accepted and ready to land.Jun 13 2023, 2:14 AM
mhorne requested changes to this revision.Jun 15 2023, 3:24 PM

One thing to fix, regarding apmd.

Can you also provide a brief description for the change? It is currently just the title. I will handle the merge to main after that.

usr.sbin/acpi/acpiconf/acpiconf.8
102

apmd still exists, but it is i386-only. I think you should just leave the references alone for now.

This revision now requires changes to proceed.Jun 15 2023, 3:24 PM
usr.sbin/acpi/acpiconf/acpiconf.8
102

you are right.
i had previously git-grep'd for it but realised now that i've mistyped it as "ampd", repeatedly. sausage fingers.
will fix.

jo_bruelltuete.com edited the summary of this revision. (Show Details)

apmd is still here

mhorne added inline comments.
usr.sbin/acpi/acpiconf/acpiconf.8
79–80

You missed this one. I will just restore it before pushing the commit.

This revision is now accepted and ready to land.Jun 16 2023, 4:36 PM
This revision was automatically updated to reflect the committed changes.
usr.sbin/acpi/acpiconf/acpiconf.8
79–80

argh, sorry.
thanks!