D15247: add rcorder(8) support to /etc/rc.resume

Eugene Grosbein eugen at grosbein.net
Thu May 3 16:03:35 UTC 2018


Hi!

While dealing with https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227866
I've found we have no easy way to insert custom "hooks" after
ACPI resume procedure other than devd(8).
And running devd itself may be undesirable for several reasons.

Manual editing of /etc/rc.resume is not desirable too
because it makes upgrades less smooth.

So, I'd like to add rcorder(8) support to /etc/rc.resume: https://reviews.freebsd.org/D15247
/etc/rc.resume will call "rcorder -k resume" and run rcNG scripts
containing "KEYWORD: resume" with single "resume" argument.

Working example is the port sysutils/cpupdate version g20180324_1
that defines extra_commands="resume" to reload CPU microcode cleared by suspend/resume sequence.

This change does nothing if system has no rcNG scripts with "KEYWORD: resume" inside.

I'm going to commit this in a week unless told not to for a reason.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20180503/1e8d4bcc/attachment.sig>


More information about the freebsd-acpi mailing list