]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/dird/ua_run.c
Eliminate FORTIFY_CODE=2 bug, and make first cut at removing
[bacula/bacula] / bacula / src / dird / ua_run.c
index 40eeb6e14aed12c412a83e9f0e352b7765c4a014..ec201ab598875e7eff77facaf1027757fba605a1 100644 (file)
@@ -1,7 +1,7 @@
 /*
    Bacula® - The Network Backup Solution
 
-   Copyright (C) 2001-2007 Free Software Foundation Europe e.V.
+   Copyright (C) 2001-2008 Free Software Foundation Europe e.V.
 
    The main author of Bacula is Kern Sibbald, with contributions from
    many others, a complete list can be found in the file AUTHORS.
@@ -122,6 +122,9 @@ try_again:
    jcr->verify_job = rc.verify_job;
    jcr->previous_job = rc.previous_job;
    jcr->pool = rc.pool;
+   if (jcr->pool != jcr->job->pool) {
+      pm_strcpy(jcr->pool_source, _("User input"));
+   }
    set_rwstorage(jcr, rc.store);
    jcr->client = rc.client;
    pm_strcpy(jcr->client_name, rc.client->name());
@@ -129,6 +132,7 @@ try_again:
    jcr->ExpectedFiles = rc.files;
    if (rc.catalog) {
       jcr->catalog = rc.catalog;
+      pm_strcpy(jcr->catalog_source, _("User input"));
    }
    if (rc.where) {
       if (jcr->where) {
@@ -201,7 +205,7 @@ try_again:
 
 
    /* If pool changed, update migration write storage */
-   if (jcr->JobType == JT_MIGRATE) {
+   if (jcr->JobType == JT_MIGRATE || jcr->JobType == JT_COPY) {
       if (!set_migration_wstorage(jcr, rc.pool)) {
          goto bail_out;
       }
@@ -272,6 +276,7 @@ try_again:
       add_prompt(ua, _("When"));             /* 5 */
       add_prompt(ua, _("Priority"));         /* 6 */
       if (jcr->JobType == JT_BACKUP ||
+          jcr->JobType == JT_COPY ||
           jcr->JobType == JT_MIGRATE ||
           jcr->JobType == JT_VERIFY) {
          add_prompt(ua, _("Pool"));          /* 7 */
@@ -353,6 +358,7 @@ try_again:
       case 7:
          /* Pool or Bootstrap depending on JobType */
          if (jcr->JobType == JT_BACKUP ||
+             jcr->JobType == JT_COPY ||
              jcr->JobType == JT_MIGRATE ||
              jcr->JobType == JT_VERIFY) {      /* Pool */
             rc.pool = select_pool_resource(ua);
@@ -848,10 +854,17 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
               jcr->JobPriority);
       }
       break;
+   case JT_COPY:
    case JT_MIGRATE:
+      char *prt_type;
+      if (jcr->JobType == JT_COPY) {
+         prt_type = _("Run Copy job\n");
+      } else {
+         prt_type = _("Run Migration job\n");
+      }
       jcr->JobLevel = L_FULL;      /* default level */
       if (ua->api) ua->signal(BNET_RUN_CMD);   
-      ua->send_msg(_("Run Migration job\n"
+      ua->send_msg("%s"
                      "JobName:       %s\n"
                      "Bootstrap:     %s\n"
                      "Client:        %s\n"
@@ -862,7 +875,8 @@ static bool display_job_parameters(UAContext *ua, JCR *jcr, JOB *job, const char
                      "JobId:         %s\n"
                      "When:          %s\n"
                      "Catalog:       %s\n"
-                     "Priority:      %d\n"),
+                     "Priority:      %d\n",
+           prt_type,
            job->name(),
            NPRT(jcr->RestoreBootstrap),
            jcr->client->name(),