]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_run.c
Minor runscript tweaks
[bacula/bacula] / bacula / src / dird / ua_run.c
index 65bdb036cfc5efb4cc38695d705e8c5f4d861f7c..e370f3f6344aef1ebb47e6212fdff55280af585e 100644 (file)
@@ -7,8 +7,8 @@
    many others, a complete list can be found in the file AUTHORS.
    This program is Free Software; you can redistribute it and/or
    modify it under the terms of version two of the GNU General Public
-   License as published by the Free Software Foundation plus additions
-   that are listed in the file LICENSE.
+   License as published by the Free Software Foundation and included
+   in the file LICENSE.
 
    This program is distributed in the hope that it will be useful, but
    WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -217,10 +217,12 @@ try_again:
          ua->send_msg(_("Level %s not valid.\n"), rc.level_name);
          goto bail_out;
       }
+      rc.level_name = NULL;
    }
    if (rc.jid) {
       /* Note, this is also MigrateJobId */
       jcr->RestoreJobId = str_to_int64(rc.jid);
+      rc.jid = 0;
    }
 
    /* Run without prompting? */
@@ -241,7 +243,8 @@ try_again:
       goto bail_out;
    }
 
-   if (ua->cmd[0] == '.' && strncasecmp(ua->cmd, ".mod ", 5) == 0) {
+   if (strncasecmp(ua->cmd, ".mod ", 5) == 0 || 
+       (strncasecmp(ua->cmd, "mod ", 4) == 0 && strlen(ua->cmd) > 6)) {
       Dmsg1(000, "got: %s\n", ua->cmd);
       parse_ua_args(ua);
       rc.mod = true;