Imported Upstream version 2.6.1p2
[debian/amanda] / client-src / sendbackup.c
index 6da1326a86a7a28ff4941f98af9c25cc3662a17a..44caf87fcc90cae8e1577ee7dba21bf32b4eb602 100644 (file)
@@ -431,6 +431,10 @@ main(
     if(am_has_feature(g_options->features, fe_rep_options_hostname)) {
        g_printf("hostname=%s;", g_options->hostname);
     }
+    if (!am_has_feature(g_options->features, fe_rep_options_features) &&
+       !am_has_feature(g_options->features, fe_rep_options_hostname)) {
+       g_printf(";");
+    }
     g_printf("\n");
     fflush(stdout);
     if (freopen("/dev/null", "w", stdout) == NULL) {
@@ -501,12 +505,11 @@ main(
            comppid = pipespawn(COMPRESS_PATH, STDIN_PIPE, 0,
                                &dumpout, &compout, &mesgfd,
                                COMPRESS_PATH, compopt, NULL);
-           dbprintf(_("gnutar: pid %ld: %s"), (long)comppid, COMPRESS_PATH);
            if(compopt != skip_argument) {
-               dbprintf(_("pid %ld: %s %s\n"),
+               dbprintf(_("compress pid %ld: %s %s\n"),
                         (long)comppid, COMPRESS_PATH, compopt);
            } else {
-               dbprintf(_("pid %ld: %s\n"), (long)comppid, COMPRESS_PATH);
+               dbprintf(_("compress pid %ld: %s\n"), (long)comppid, COMPRESS_PATH);
            }
        } else if (dle->compress == COMP_CUST) {
            compopt = skip_argument;
@@ -667,15 +670,17 @@ main(
            /*NOTREACHED*/
        }
 
+       result = 0;
        while ((line = agets(dumperr)) != NULL) {
            if (strlen(line) > 0) {
                fdprintf(mesgfd, "sendbackup: error [%s]\n", line);
                dbprintf("error: %s\n", line);
+               result = 1;
            }
            amfree(line);
        }
 
-       result = check_result(mesgfd);
+       result |= check_result(mesgfd);
        if (result == 0) {
            char *amandates_file;