From: Eric Bollengier Date: Mon, 22 Mar 2010 13:31:58 +0000 (+0100) Subject: Fix #1526 about verify jobs and runscript X-Git-Tag: Release-5.2.1~1580 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=50d67e48f8eb35d80e109a5706fc2b14d560e58c;p=bacula%2Fbacula Fix #1526 about verify jobs and runscript --- 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",