From: Eric Bollengier Date: Sat, 5 Aug 2006 20:18:49 +0000 (+0000) Subject: ebl Fix bug on RunBefore X-Git-Tag: Release-2.0.0~658 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a3fed55373810cd71542047ab973bacf4352d9a6;p=bacula%2Fbacula ebl Fix bug on RunBefore git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3247 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/dird/job.c b/bacula/src/dird/job.c index d71fb8fb23..b028ca95d1 100644 --- a/bacula/src/dird/job.c +++ b/bacula/src/dird/job.c @@ -240,12 +240,13 @@ static void *job_thread(void *arg) Jmsg(jcr, M_FATAL, 0, "%s", db_strerror(jcr->db)); } + /* Run any script BeforeJob on dird */ + run_scripts(jcr, jcr->job->RunScripts, "BeforeJob"); + if (job_canceled(jcr)) { update_job_end_record(jcr); - } else { - /* Run any script BeforeJob on dird */ - run_scripts(jcr, jcr->job->RunScripts, "BeforeJob"); + } else { /* * We re-update the job start record so that the start * time is set after the run before job. This avoids