path: root/man
diff options
authorFlorian Schmaus <flo@geekplace.eu>2021-03-28 14:55:04 +0200
committerMichał Górny <mgorny@gentoo.org>2021-08-22 17:32:07 +0200
commit6e86186244d048e3edd5c11c18cfb4eee98a0d56 (patch)
tree3da77e536c491975a8afa21b8746935f5aa2c751 /man
parentutil: add portage.util.hooks.get_hooks_from_dir() (diff)
dispatch-conf: Add support for conf-update.d hook directory
Those hooks can be used by tools that manage /etc to get notified about updated configuration files. For example, etckeeper could hook this mechanism like the following: /etc/portage/conf-update.d/etckeeper case "${1}" in pre-update) etckeeper pre-install ;; post-update) etckeeper post-install ;; esac Currently conf-update.d hooks are called with 4 different events: - pre-session - post-session - pre-update - post-update The *-session events are emitted prior starting a new configuration update sesssion, and when it is finished. That is, the pre-session event is emitted just before dispatch-conf displays the first configuration file, and right before it exists. The *-update events are emitted before and after a configuration file has been updated. The path of the configuration file is provided as second hook argument. Signed-off-by: Florian Schmaus <flo@geekplace.eu> Closes: https://bugs.gentoo.org/698316 Bug: https://bugs.gentoo.org/260623 Closes: https://github.com/gentoo/portage/pull/689 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'man')
1 files changed, 5 insertions, 0 deletions
diff --git a/man/dispatch-conf.1 b/man/dispatch-conf.1
index a3d233bc0..b877b6942 100644
--- a/man/dispatch-conf.1
+++ b/man/dispatch-conf.1
@@ -70,6 +70,11 @@ older permissions of the first check in may be inherited. As
mentioned in the \fBci\fR(1) man page, users can control access
to RCS files by setting the permissions of the directory
containing the files.
+\fIdispatch\-conf\fR will run hooks in \fB/etc/portage/conf-update.d\fR.
+The first argument of the hook is either \fIpre-session\fR, \fIpost-ression\fR,
+\fIpre-update\fR, or, \fIpost-update\fR. In case of *-update events, a second
+argument containing the path of the configuration file is also provided.
Please report bugs via https://bugs.gentoo.org/