From 463375376ccd215bce5ce19a6a4ddce5b61dc0d4 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Fri, 3 Nov 2006 14:14:00 +0000 Subject: [PATCH] ebl fix runscript on director git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3597 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/dird/dird_conf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bacula/src/dird/dird_conf.c b/bacula/src/dird/dird_conf.c index 520d133cc9..ae3f975850 100644 --- a/bacula/src/dird/dird_conf.c +++ b/bacula/src/dird/dird_conf.c @@ -1598,7 +1598,7 @@ static void store_runscript_target(LEX *lc, RES_ITEM *item, int index, int pass) } else if (strcmp(lc->str, "yes") == 0) { ((RUNSCRIPT*) item->value)->set_target("%c"); } else if (strcmp(lc->str, "no") == 0) { - /* store nothing, run on director */ + ((RUNSCRIPT*) item->value)->set_target(""); } else { RES *res = GetResWithName(R_CLIENT, lc->str); if (res == NULL) { @@ -1640,11 +1640,13 @@ static void store_short_runscript(LEX *lc, RES_ITEM *item, int index, int pass) if (strcmp(item->name, "runbeforejob") == 0) { script->when = SCRIPT_Before; script->abort_on_error = true; + script->set_target(""); } else if (strcmp(item->name, "runafterjob") == 0) { script->when = SCRIPT_After; script->on_success = true; script->on_failure = false; + script->set_target(""); } else if (strcmp(item->name, "clientrunafterjob") == 0) { script->old_proto = true; @@ -1663,6 +1665,7 @@ static void store_short_runscript(LEX *lc, RES_ITEM *item, int index, int pass) script->when = SCRIPT_After; script->on_failure = true; script->on_success = false; + script->set_target(""); } if (*runscripts == NULL) { -- 2.39.5