]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #9945 About incorrect job status after Runscript::Console execution
authorEric Bollengier <eric@baculasystems.com>
Thu, 9 Mar 2023 08:01:57 +0000 (09:01 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 14 Sep 2023 11:57:01 +0000 (13:57 +0200)
bacula/src/lib/runscript.c

index 2f3b0d029e4c7b32c88dbab6184d9e9b873c3d92..345ba0389730a92734d466d66447e761994c9cff 100644 (file)
@@ -343,9 +343,9 @@ int RUNSCRIPT::run_get_code(JCR *jcr, const char *name)
    case CONSOLE_CMD:
       if (console_command) {                 /* can we run console command? */
          if (!console_command(jcr, ecmd)) {  /* yes, do so */
-            status = 0;
-         } else {
             status = 1;
+         } else {
+            status = 0;
          }
       }
       break;