For symmetry with rc.resume, give rc.suspend the ability to execute rc-scripts.
Use the suspend keyword for that.
Use-case is for setting a wake-up time, e.g. via efiwake.
Differential D39965
rc.suspend: execute rc-scripts with suspend keyword jo_bruelltuete.com on May 4 2023, 6:02 PM. Authored by Tags None Referenced Files
Subscribers
Details For symmetry with rc.resume, give rc.suspend the ability to execute rc-scripts. Use-case is for setting a wake-up time, e.g. via efiwake. I've tried this on my NAS box, works as intended: Dummy test script /etc/rc.d/try_resume: #!/bin/sh - # KEYWORD: resume # KEYWORD: suspend # REQUIRE: jail logger "try resume: ${1}" Press the sleep button, optionally wait a minute or so, press wake button: May 4 18:54:46 fred root[53062]: try resume: suspend May 4 18:54:46 fred acpi[53067]: suspend at 20230504 18:54:46 ...noise... May 4 18:57:53 fred acpi[53080]: resumed at 20230504 18:57:53 ...noise... May 4 18:58:09 fred root[53159]: try resume: resume
Diff Detail
Event TimelineComment Actions i've pretty much copy-pasted the added bits from rc.resume and adjusted the keyword. that's it. Comment Actions It'd better to rename the commit title to: rc.suspend: execute rc-scripts with suspend keyword, otherwise LGTM. Comment Actions Seems ok to me. Looks like rc.suspend should be documented to some extent in rc.8, if anyone would like to take that on. rc.resume is at least mentioned there. Approved.
|