mirror of
https://github.com/OpenRC/openrc.git
synced 2024-11-27 11:54:26 +08:00
man/openrc-run.8: document _pre and _post functions
Fixes https://github.com/openrc/openrc/issues/155.
This commit is contained in:
parent
6d4e843397
commit
f48d9c33a5
@ -284,6 +284,18 @@ system.
|
||||
To see how to influence dependencies in configuration files, see the
|
||||
.Sx FILES
|
||||
section below.
|
||||
.Sh _pre AND _post FUNCTIONS
|
||||
Any command defined in extra_commands, extra_started_commands or
|
||||
extra_stopped_commands can have _pre and _post functions in the service
|
||||
script. If the command function is called foo, the_pre and _post
|
||||
functions for it should be called foo_pre and foo_post.
|
||||
.Pp
|
||||
These functions should be used to perform preparation before the
|
||||
command is run and cleanup after the command completes. In order for
|
||||
.Nm
|
||||
to record the command as being run successfully, the _pre
|
||||
function, command function itself and the _post function should all exit
|
||||
with a zero return code.
|
||||
.Sh BUILTINS
|
||||
.Nm
|
||||
defines some builtin functions that you can use inside your service scripts:
|
||||
|
Loading…
Reference in New Issue
Block a user