Ignore:
Timestamp:
Sep 17, 2009, 2:23:18 AM (11 years ago)
Author:
Bruno Cornec
Message:
  • At restore time read the netfs protocol in the conf file
  • Use dir for shell related commands and dir1 for C related actions in open_and_list_dir to avoid missing some files with { in names e.g.

(Backports from 2.2.9)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c

    r2389 r2404  
    749749        bkpinfo->backup_media_type = netfs;
    750750        bkpinfo->please_dont_eject = TRUE;
     751        mr_free(value);
     752
     753        mr_free(bkpinfo->netfs_proto);
     754        if ((value = read_cfg_var(cfg_file, "netfs-proto")) == 0) {
     755            mr_asprintf(bkpinfo->netfs_proto, "%s", value);
     756        } else {
     757            /* For compatibility, force protocol in old nfs case to be transparent */
     758            mr_asprintf(bkpinfo->netfs_proto, "nfs");
     759        }
     760        mr_free(value);
     761
    751762        mr_free(bkpinfo->prefix);
    752         mr_free(value);
    753763        if ((value = read_cfg_var(cfg_file, "iso-prefix")) == 0) {
    754764            mr_asprintf(bkpinfo->prefix, "%s", value);
     
    756766            mr_asprintf(bkpinfo->prefix, "%s", STD_PREFIX);
    757767        }
     768        mr_free(value);
    758769   
    759770        tmp = call_program_and_get_last_line_of_output("cat " CMDLINE);
     
    769780        }
    770781        mr_free(tmp);
    771     /* For compatibility, force protocol in old nfs case to be transparent */
    772     if (!strcmp(value, "nfs")) {
    773         mr_free(bkpinfo->netfs_proto);
    774         mr_asprintf(bkpinfo->netfs_proto, "nfs");
    775     }
    776782
    777783    } else if (!strcmp(value, "tape")) {
Note: See TracChangeset for help on using the changeset viewer.