]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virhook: support hooks placed in $driver.d/
authorDmitry Nesterenko <dmitry.nesterenko@virtuozzo.com>
Tue, 23 Jun 2020 14:45:34 +0000 (17:45 +0300)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 23 Jun 2020 16:34:15 +0000 (18:34 +0200)
commitfeb83c1e710b9ea8044a89346f4868d03b31b0f1
tree622382b190364ca915aaaa160f165630e0b83e54
parent841910b5deac0e0e726ca20e5e80a1c40bd98262
virhook: support hooks placed in $driver.d/

It is easier for management software (and subsequently
distributions) to install hook script under
/etc/libvirt/hooks/$driver.d/ and have libvirt execute them in
alphabetical order. To maintain backwards compatibility,
/etc/libvirt/hooks/$driver hook script is executed the first
followed by scripts from the $driver.d directory.

The stdio is chained between the scripts. The output of the first
script is input of the second and so on.

Signed-off-by: Dmitry Nesterenko <dmitry.nesterenko@virtuozzo.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virhook.c