Changeset 2386 in MondoRescue


Ignore:
Timestamp:
Sep 10, 2009, 4:06:52 PM (15 years ago)
Author:
Bruno Cornec
Message:

Be compatible on backup type by making old nfs recognized as netfs and proto forced

File:
1 edited

Legend:

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

    r2380 r2386  
    805805            strcpy(bkpinfo->prefix,STD_PREFIX);
    806806    }
    807 } else if (!strcmp(value, "netfs")) {
     807} else if ((!strcmp(value, "netfs")) || (!strcmp(value, "nfs"))) {
     808    /* Stay compatible with previous versions by allowing nfs as an entry here */
    808809    bkpinfo->backup_media_type = netfs;
    809810    bkpinfo->please_dont_eject = TRUE;
     
    815816    if (strstr(call_program_and_get_last_line_of_output
    816817       ("cat /proc/cmdline"), "pxe")) {
    817         /* We need to override prefix value in PXE mode as it's 
     818        /* We need to override prefix value in PXE mode as it's
    818819        * already done in start-netfs */
    819820        envtmp1 = getenv("imgname");
     
    822823        }
    823824        strcpy(bkpinfo->prefix,envtmp1);
     825    }
     826    /* For compatibility, force protocol in old nfs case to be transparent */
     827    if (!strcmp(value, "nfs")) {
     828        mr_free(bkpinfo->netfs_proto);
     829        mr_asprintf(bkpinfo->netfs_proto, "nfs");
    824830    }
    825831
Note: See TracChangeset for help on using the changeset viewer.