提交 32398e12 编写于 作者: O Osier Yang

util: Initialize hooks at daemon shutdown if no hooks defined

We support to initialize the hooks at daemon reload if there is no
hooks script is defined, we should also support initialize the hooks
at daemon shutdown if no hooks is defined.

To address bz: https://bugzilla.redhat.com/show_bug.cgi?id=688859
上级 2225a491
......@@ -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();
if ((virHooksFound & (1 << driver)) == 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册