Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 468738 - sys-apps/openrc - add two new RC_HOOK_ states for plugins indicating system startup complete and system shutdown initiated
Summary: sys-apps/openrc - add two new RC_HOOK_ states for plugins indicating system s...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-06 08:36 UTC by Max Hacking
Modified: 2013-05-06 08:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to add extra plugin hook states (openrc-0.11.8-extra_plugin_hooks.patch,1.72 KB, text/plain)
2013-05-06 08:36 UTC, Max Hacking
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Hacking 2013-05-06 08:36:34 UTC
Created attachment 347500 [details]
Patch to add extra plugin hook states

Currently OpenRC executes any plugins with hooks for runlevel and service start and stop (in and out).

The attached patch adds two new hook states:

1) RC_HOOK_SYSTEM_START_FINISHED which fires once after system start has completed.  It should not fire on any other event (such as switching runlevel, etc).

2) RC_HOOK_SYSTEM_STOP_INITIATED which fires once when the shutdown runlevel is selected by init (after a shutdown command or a three-finger-salute, etc).

This addition makes writing plugins which are only interested in these states possible.

This patch should apply cleanly to most recent versions although the line numbers assume that the patches I supplied in bug 467368 and bug 468736 have already been applied.