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-tools.c

    r2357 r2382  
    373373 * - Used: @c bkpinfo->make_cd_use_lilo
    374374 * - Used: @c bkpinfo->media_device
    375  * - Used: @c bkpinfo->nfs_mount
     375 * - Used: @c bkpinfo->netfs_mount
    376376 * - Used: @c bkpinfo->nonbootable_backup
    377377 * - Used: @c bkpinfo->scratchdir
     
    657657    }                           // end of iso code
    658658
    659     if (bkpinfo->backup_media_type == nfs) {
    660         if (bkpinfo->nfs_mount) {
    661             mr_asprintf(hostname, "%s", bkpinfo->nfs_mount);
     659    if (bkpinfo->backup_media_type == netfs) {
     660        if (bkpinfo->netfs_mount) {
     661            mr_asprintf(hostname, "%s", bkpinfo->netfs_mount);
    662662        } else {
    663             log_it("nfs_mount is NULL");
     663            log_it("netfs_mount is NULL");
    664664            retval++;
    665665            mr_asprintf(hostname, "");
     
    667667        colon = strchr(hostname, ':');
    668668        if (!colon) {
    669             log_it("nfs mount doesn't have a colon in it");
     669            log_it("netfs mount doesn't have a colon in it");
    670670            retval++;
    671671        } else {
     
    675675            hent = gethostbyname(hostname);
    676676            if (!hent) {
    677                 log_it("Can't resolve NFS mount (%s): %s", hostname, hstrerror(h_errno));
     677                log_it("Can't resolve Network mount (%s): %s", hostname, hstrerror(h_errno));
    678678                retval++;
    679679            } else {
    680680                mr_asprintf(ip_address, "%s", inet_ntoa((struct in_addr) *((struct in_addr *) hent->h_addr)));
    681                 mr_strcat(ip_address, strchr(bkpinfo->nfs_mount, ':'));
    682                 mr_free(bkpinfo->nfs_mount);
    683                 bkpinfo->nfs_mount = ip_address;
     681                mr_strcat(ip_address, strchr(bkpinfo->netfs_mount, ':'));
     682                mr_free(bkpinfo->netfs_mount);
     683                bkpinfo->netfs_mount = ip_address;
    684684            }
    685685        }
    686686        mr_free(hostname);
    687         store_nfs_config();
     687        store_netfs_config();
    688688    }
    689689
     
    797797    mr_free(bkpinfo->call_after_iso);
    798798    mr_free(bkpinfo->kernel_path);
    799     mr_free(bkpinfo->nfs_mount);
    800     mr_free(bkpinfo->nfs_remote_dir);
    801     mr_free(bkpinfo->nfs_user);
     799    mr_free(bkpinfo->netfs_mount);
     800    mr_free(bkpinfo->netfs_remote_dir);
     801    mr_free(bkpinfo->netfs_user);
     802    mr_free(bkpinfo->netfs_proto);
    802803    mr_free(bkpinfo->postnuke_tarball);
    803804
     
    855856    bkpinfo->call_after_iso = NULL;
    856857    bkpinfo->kernel_path = NULL;
    857     bkpinfo->nfs_mount = NULL;
    858     bkpinfo->nfs_remote_dir = NULL;
    859     bkpinfo->nfs_user = NULL;
     858    bkpinfo->netfs_mount = NULL;
     859    bkpinfo->netfs_remote_dir = NULL;
     860    bkpinfo->netfs_user = NULL;
     861    bkpinfo->netfs_proto = NULL;
    860862    bkpinfo->postnuke_tarball = NULL;
    861863    bkpinfo->wipe_media_first = FALSE;
Note: See TracChangeset for help on using the changeset viewer.