Ignore:
Timestamp:
Sep 9, 2009, 8:30:47 PM (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)
  • Better logging to detect a potential nuke issue
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/mondorestore/mondorestore.c

    r2373 r2380  
    964964
    965965    strcpy(bkpinfo->restore_path, "/");
    966     if (!g_restoring_live_from_cd && !g_restoring_live_from_nfs) {
     966    if (!g_restoring_live_from_cd && !g_restoring_live_from_netfs) {
    967967        popup_and_OK
    968968            ("Please insert tape/CD/USB Key, then hit 'OK' to continue.");
    969969        sleep(1);
    970970    }
    971     if (!g_restoring_live_from_nfs) {
     971    if (!g_restoring_live_from_netfs) {
    972972        interactively_obtain_media_parameters_from_user(FALSE);
    973973    }
     
    990990    load_raidtab_into_raidlist(raidlist, RAIDTAB_FNAME);
    991991
    992     if (!g_restoring_live_from_nfs && (filelist = process_filelist_and_biggielist())) {
     992    if (!g_restoring_live_from_netfs && (filelist = process_filelist_and_biggielist())) {
    993993        save_filelist(filelist, "/tmp/selected-files.txt");
    994994        strcpy(old_restpath, bkpinfo->restore_path);
     
    30963096        mount_boot_if_necessary();  /* for Gentoo users */
    30973097        log_msg(2, "Still here.");
    3098         if (bkpinfo->backup_media_type == nfs) {
    3099             g_restoring_live_from_nfs = TRUE;
     3098        if (bkpinfo->backup_media_type == netfs) {
     3099            g_restoring_live_from_netfs = TRUE;
    31003100        }
    31013101        log_msg(2, "Calling restore_to_live_filesystem()");
     
    31233123        // BCO:To be reviewed
    31243124        if ((bkpinfo->restore_mode == compare) || (bkpinfo->restore_mode == nuke)) {
    3125             if (bkpinfo->backup_media_type == nfs
    3126                 && !is_this_device_mounted(bkpinfo->nfs_mount)) {
    3127                 log_msg(1, "Mounting nfs dir");
     3125            if (bkpinfo->backup_media_type == netfs
     3126                && !is_this_device_mounted(bkpinfo->netfs_mount)) {
     3127                log_msg(1, "Mounting remote %s dir", bkpinfo->netfs_proto);
    31283128                sprintf(bkpinfo->isodir, "/tmp/isodir");
    31293129                run_program_and_log_output("mkdir -p /tmp/isodir", 5);
    3130                 sprintf(tmp, "mount %s -t nfs -o nolock,ro /tmp/isodir",
    3131                         bkpinfo->nfs_mount);
     3130                if (strstr(bkpinfo->netfs_proto, "sshfs")) {
     3131                    sprintf(tmp, "sshfs -o ro /tmp/isodir",
     3132                        bkpinfo->netfs_mount);
     3133                } else {
     3134                    sprintf(tmp, "mount %s -o nolock,ro /tmp/isodir",
     3135                        bkpinfo->netfs_mount);
    31323136                run_program_and_log_output(tmp, 1);
    31333137            }
Note: See TracChangeset for help on using the changeset viewer.