+ if (dp->program &&
+ (strcmp(dp->program,"DUMP") == 0 ||
+ strcmp(dp->program,"GNUTAR") == 0)) {
+ if(strcmp(dp->program, "DUMP") == 0 &&
+ !am_has_feature(hostp->features, fe_program_dump)) {
+ g_fprintf(outf, _("ERROR: %s:%s does not support DUMP.\n"),
+ hostp->hostname, qname);
+ g_fprintf(outf, _("You must upgrade amanda on the client to use DUMP "
+ "or you can use another program.\n"));
+ }
+ if(strcmp(dp->program, "GNUTAR") == 0 &&
+ !am_has_feature(hostp->features, fe_program_gnutar)) {
+ g_fprintf(outf, _("ERROR: %s:%s does not support GNUTAR.\n"),
+ hostp->hostname, qname);
+ g_fprintf(outf, _("You must upgrade amanda on the client to use GNUTAR "
+ "or you can use another program.\n"));
+ }
+ if(dp->estimate == ES_CALCSIZE &&
+ !am_has_feature(hostp->features, fe_calcsize_estimate)) {
+ g_fprintf(outf, _("ERROR: %s:%s does not support CALCSIZE for "
+ "estimate, using CLIENT.\n"),
+ hostp->hostname, qname);
+ g_fprintf(outf, _("You must upgrade amanda on the client to use "
+ "CALCSIZE for estimate or don't use CALCSIZE for estimate.\n"));
+ dp->estimate = ES_CLIENT;
+ }
+ if(dp->estimate == ES_CALCSIZE &&
+ am_has_feature(hostp->features, fe_selfcheck_calcsize))
+ calcsize = "CALCSIZE ";
+ else
+ calcsize = "";
+
+ if(dp->compress == COMP_CUST &&
+ !am_has_feature(hostp->features, fe_options_compress_cust)) {
+ g_fprintf(outf,
+ _("ERROR: Client %s does not support custom compression.\n"),
+ hostp->hostname);
+ g_fprintf(outf, _("You must upgrade amanda on the client to "
+ "use custom compression\n"));
+ g_fprintf(outf, _("Otherwise you can use the default client "
+ "compression program.\n"));
+ }
+ if(dp->encrypt == ENCRYPT_CUST ) {
+ if ( !am_has_feature(hostp->features, fe_options_encrypt_cust)) {
+ g_fprintf(outf,
+ _("ERROR: Client %s does not support data encryption.\n"),
+ hostp->hostname);
+ g_fprintf(outf, _("You must upgrade amanda on the client to use encryption program.\n"));
+ remote_errors++;
+ } else if ( dp->compress == COMP_SERVER_FAST ||
+ dp->compress == COMP_SERVER_BEST ||
+ dp->compress == COMP_SERVER_CUST ) {
+ g_fprintf(outf,
+ _("ERROR: %s: Client encryption with server compression "
+ "is not supported. See amanda.conf(5) for detail.\n"),
+ hostp->hostname);
+ remote_errors++;
+ }
+ }
+ if (am_has_feature(hostp->features, fe_req_xml)) {
+ l = vstralloc("<dle>\n"
+ " <program>",
+ dp->program,
+ "</program>\n", NULL);
+ if (strlen(calcsize) > 0)
+ vstrextend(&l, " <calcsize>YES</calcsize>\n", NULL);
+ vstrextend(&l, " ", b64disk, "\n", NULL);
+ if (dp->device)
+ vstrextend(&l, " ", b64device, "\n", NULL);
+ vstrextend(&l, o, "</dle>\n", NULL);
+ } else {
+ if (dp->device) {
+ l = vstralloc(calcsize,
+ dp->program, " ",
+ qname, " ",
+ qdevice,
+ " 0 OPTIONS |",
+ o,
+ "\n",
+ NULL);
+ } else {
+ l = vstralloc(calcsize,
+ dp->program, " ",
+ qname,
+ " 0 OPTIONS |",
+ o,
+ "\n",
+ NULL);
+ }
+ }
+ } else {
+ if (!am_has_feature(hostp->features, fe_program_application_api) ||
+ !am_has_feature(hostp->features, fe_req_xml)) {
+ g_fprintf(outf, _("ERROR: %s:%s does not support APPLICATION-API.\n"),
+ hostp->hostname, qname);
+ g_fprintf(outf, _("Dumptype configuration is not GNUTAR or DUMP."
+ " It is case sensitive\n"));
+ l = stralloc("");
+ } else {
+ l = vstralloc("<dle>\n"
+ " <program>APPLICATION</program>\n", NULL);
+ if (dp->application) {
+ char *xml_app = xml_application(dp->application,
+ hostp->features);
+ vstrextend(&l, xml_app, NULL);
+ amfree(xml_app);
+ }
+ if (dp->pp_scriptlist) {
+ if (!am_has_feature(hostp->features, fe_pp_script)) {
+ g_fprintf(outf,
+ _("ERROR: %s:%s does not support SCRIPT-API.\n"),
+ hostp->hostname, qname);
+ }
+ }
+ vstrextend(&l, " ", b64disk, "\n", NULL);
+ if (dp->device)
+ vstrextend(&l, " ", b64device, "\n", NULL);
+ vstrextend(&l, o, "</dle>\n", NULL);
+ }