From 50d67e48f8eb35d80e109a5706fc2b14d560e58c Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 22 Mar 2010 14:31:58 +0100 Subject: [PATCH] Fix #1526 about verify jobs and runscript --- bacula/src/lib/runscript.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bacula/src/lib/runscript.c b/bacula/src/lib/runscript.c index 1122f30dc1..49099cec79 100644 --- a/bacula/src/lib/runscript.c +++ b/bacula/src/lib/runscript.c @@ -132,9 +132,10 @@ int run_scripts(JCR *jcr, alist *runscripts, const char *label) runit = false; if ((script->when & SCRIPT_Before) && (when & SCRIPT_Before)) { - if ((script->on_success - && (jcr->JobStatus == JS_Running || jcr->JobStatus == JS_Created)) - || (script->on_failure && job_canceled(jcr)) + if ((script->on_success && + (jcr->JobStatus == JS_Running || jcr->JobStatus == JS_Created)) + || (script->on_failure && + (job_canceled(jcr) || jcr->JobStatus == JS_Differences)) ) { Dmsg4(200, "runscript: Run it because SCRIPT_Before (%s,%i,%i,%c)\n", @@ -159,7 +160,8 @@ int run_scripts(JCR *jcr, alist *runscripts, const char *label) if ((script->when & SCRIPT_After) && (when & SCRIPT_After)) { if ((script->on_success && (jcr->JobStatus == JS_Terminated || jcr->JobStatus == JS_Warnings)) - || (script->on_failure && job_canceled(jcr)) + || (script->on_failure && + (job_canceled(jcr) || jcr->JobStatus == JS_Differences)) ) { Dmsg4(200, "runscript: Run it because SCRIPT_After (%s,%i,%i,%c)\n", -- 2.39.5