From: Eric Bollengier Date: Fri, 3 Nov 2006 14:14:00 +0000 (+0000) Subject: ebl fix runscript on director X-Git-Tag: Release-2.0.0~320 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6f6aaa5a1ab969a158abb2c6698a440585ae94c4;p=bacula%2Fbacula ebl fix runscript on director git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@3597 91ce42f0-d328-0410-95d8-f526ca767f89 --- 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) {