]> xenbits.xensource.com Git - libvirt.git/commitdiff
hooks: fix regression in previous patch
authorEric Blake <eblake@redhat.com>
Fri, 25 Mar 2011 21:14:27 +0000 (15:14 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 25 Mar 2011 21:15:11 +0000 (15:15 -0600)
* src/util/hooks.c (virHookCheck): Missing hooks should just be
debug, not warn.

src/util/hooks.c

index 99dddc4c0551df820ffe82001a328403c38e5bb4..819c95cce5babbe5121fb9a322f3acb2ebdf50ff 100644 (file)
@@ -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);