Ignore:
Timestamp:
Sep 10, 2009, 2:07:16 AM (15 years ago)
Author:
Bruno Cornec
Message:
  • Change NFS support into a NetFS support to allow for multiple protocol in addition to NFS (NEEDS TESTING)

(Backport from 2.2.9)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/common/libmondo-archive.c

    r2376 r2382  
    759759        mr_asprintf(value, "iso");
    760760        break;
    761     case nfs:
    762         mr_asprintf(value, "nfs");
     761    case netfs:
     762        mr_asprintf(value, "netfs");
    763763        break;
    764764    case dvd:
     
    824824    }
    825825
    826     estimated_total_noof_slices =
    827         size_of_all_biggiefiles_K(bkpinfo) / bkpinfo->optimal_set_size + 1;
    828     /* BERLIOS: add nfs stuff here? */
     826    estimated_total_noof_slices = size_of_all_biggiefiles_K(bkpinfo) / bkpinfo->optimal_set_size + 1;
     827
     828    /* BERLIOS: add netfs stuff here? */
    829829    mr_asprintf(command, "mkdir -p %s/images", bkpinfo->scratchdir);
    830830    if (system(command)) {
     
    12181218
    12191219    if ((bkpinfo->isodir != NULL) && (bkpinfo->prefix != NULL)) {
    1220         if (bkpinfo->nfs_remote_dir) {
     1220        if (bkpinfo->netfs_remote_dir) {
    12211221            // NFS
    1222             mr_asprintf(command, "rm -f %s/%s/%s-[1-9]*.iso", bkpinfo->isodir, bkpinfo->nfs_remote_dir, bkpinfo->prefix);
     1222            mr_asprintf(command, "rm -f %s/%s/%s-[1-9]*.iso", bkpinfo->isodir, bkpinfo->netfs_remote_dir, bkpinfo->prefix);
    12231223        } else {
    12241224            // ISO
     
    31313131 * - @c manual_cd_tray
    31323132 * - @c media_size
    3133  * - @c nfs_mount
    3134  * - @c nfs_remote_dir
     3133 * - @c netfs_mount
     3134 * - @c netfs_remote_dir
    31353135 * - @c scratchdir
    31363136 * - @c verify_data
     
    32033203        log_to_screen("Warning! CD is too big. It occupies %ld KB, which is more than the %ld KB allowed.", (long) space_occupied_by_cd(bkpinfo->scratchdir), (long) bkpinfo->media_size[g_current_media_number]);
    32043204    }
    3205     if (((bkpinfo->isodir == NULL) && (bkpinfo->nfs_remote_dir == NULL)) || (bkpinfo->prefix == NULL)) {
     3205    if (((bkpinfo->isodir == NULL) && (bkpinfo->netfs_remote_dir == NULL)) || (bkpinfo->prefix == NULL)) {
    32063206        fatal_error("Something wrong in your environement. Report to dev team");
    32073207    }
    3208     if (bkpinfo->nfs_remote_dir) {
    3209         // NFS
    3210         mr_asprintf(isofile, "%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->nfs_remote_dir, bkpinfo->prefix, g_current_media_number);
     3208    if (bkpinfo->netfs_remote_dir) {
     3209        // Network
     3210        mr_asprintf(isofile, "%s/%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->netfs_remote_dir, bkpinfo->prefix, g_current_media_number);
    32113211    } else {
    32123212        // ISO
    32133213        mr_asprintf(isofile, "%s/%s-%d.iso", bkpinfo->isodir, bkpinfo->prefix, g_current_media_number);
    32143214    }
     3215
    32153216    for (that_one_was_ok = FALSE; !that_one_was_ok;) {
    32163217        if (bkpinfo->backup_media_type != usb) {
Note: See TracChangeset for help on using the changeset viewer.