From 42a0fc39c1ea03439f880bd04bbe17724f00986e Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Fri, 25 Mar 2011 15:14:27 -0600 Subject: [PATCH] hooks: fix regression in previous patch * src/util/hooks.c (virHookCheck): Missing hooks should just be debug, not warn. --- src/util/hooks.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/util/hooks.c b/src/util/hooks.c index 99dddc4c05..819c95cce5 100644 --- a/src/util/hooks.c +++ b/src/util/hooks.c @@ -110,9 +110,12 @@ virHookCheck(int no, const char *driver) { return -1; } - if (!virFileIsExecutable(path)) { + if (!virFileExists(path)) { ret = 0; - VIR_WARN("Missing or non-executable hook script %s", path); + VIR_DEBUG("No hook script %s", path); + } else if (!virFileIsExecutable(path)) { + ret = 0; + VIR_WARN("Non-executable hook script %s", path); } else { ret = 1; VIR_DEBUG("Found hook script %s", path); -- GitLab