Re: [PATCH] util: Initialize hooks at daemon shutdown if no hooks defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/25/2011 04:28 AM, Osier Yang wrote:
> We support to initialize the hooks at daemon reload if there is no
> hooks script is defined, should we also support initialize the hooks

s/should we/we should/

> at daemon shutdown if no hooks is defined?

s/\?/./

(that is, frame this as a statement, not a question)

> 
> To address bz: https://bugzilla.redhat.com/show_bug.cgi?id=688859
> ---
>  src/util/hooks.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/src/util/hooks.c b/src/util/hooks.c
> index a409d77..30e20ac 100644
> --- a/src/util/hooks.c
> +++ b/src/util/hooks.c
> @@ -209,7 +209,8 @@ virHookCall(int driver, const char *id, int op, int sub_op, const char *extra,
>       */
>      if ((virHooksFound == -1) ||
>          ((driver == VIR_HOOK_DRIVER_DAEMON) &&
> -         (op == VIR_HOOK_DAEMON_OP_RELOAD)))
> +         (op == VIR_HOOK_DAEMON_OP_RELOAD ||
> +         op == VIR_HOOK_DAEMON_OP_SHUTDOWN)))
>          virHookInitialize();

ACK; looks like a reasonable fix for the mentioned bugzilla.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]