]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/dird_conf.c
ebl Fix bug on RunBefore
[bacula/bacula] / bacula / src / dird / dird_conf.c
index 59cb3873c3926b1af0c719ae2ff77d092912b305..c26b1a7fcf707a09a14c5221c3d626e8907ed9c1 100644 (file)
@@ -1632,6 +1632,8 @@ static void store_short_runscript(LEX *lc, RES_ITEM *item, int index, int pass)
 
       script->set_command(lc->str);
 
+      /* TODO: remove all script->old_proto with bacula 1.42 */
+
       if (strcmp(item->name, "runbeforejob") == 0) {
          script->when = SCRIPT_Before;
          script->abort_on_error = true;
@@ -1642,12 +1644,14 @@ static void store_short_runscript(LEX *lc, RES_ITEM *item, int index, int pass)
          script->on_failure = false;
          
       } else if (strcmp(item->name, "clientrunafterjob") == 0) {
+         script->old_proto = true;
          script->when = SCRIPT_After;
          script->set_target("%c");
          script->on_success = true;
          script->on_failure = false;
 
       } else if (strcmp(item->name, "clientrunbeforejob") == 0) {
+         script->old_proto = true;
          script->when = SCRIPT_Before;
          script->set_target("%c");
          script->abort_on_error = true;