Ignore:
Timestamp:
Oct 25, 2006, 1:49:52 AM (18 years ago)
Author:
Bruno Cornec
Message:

merge -r862:888 $SVN_M/branches/stable

File:
1 edited

Legend:

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

    r900 r903  
    793793    char *tmp = NULL;
    794794    char *tmp1 = NULL;
     795    char *envtmp1 = NULL;
     796    char *envtmp2 = NULL;
    795797    char *command = NULL;
    796798    char *iso_mnt = NULL;
     
    854856            /* We need to override prefix value in PXE mode as it's
    855857             * already done in start-nfs */
     858            envtmp1 = getenv("imgname");
     859            if (envtmp1 == NULL) {
     860                fatal_error("no imgname variable in environment");
     861            }
    856862            if (strstr(call_program_and_get_last_line_of_output
    857863               ("cat /proc/cmdline"), "pxe")) {
    858                     strcpy(bkpinfo->prefix,getenv("imgname"));
     864                    mr_allocstr(bkpinfo->prefix,envtmp1);
    859865            }
    860866
     
    985991        /* We need to override values in PXE mode as it's
    986992         * already done in start-nfs */
     993        envtmp1 = getenv("nfsmount");
     994        if (envtmp1 == NULL) {
     995            fatal_error("no nfsmount variable in environment");
     996            }
     997        envtmp2 = getenv("dirimg");
     998        if (envtmp2 == NULL) {
     999            fatal_error("no dirimg variable in environment");
     1000        }
    9871001        if (strstr(call_program_and_get_last_line_of_output
    9881002           ("cat /proc/cmdline"), "pxe")) {
    989                 strcpy(bkpinfo->nfs_mount,getenv("nfsmount"));
    990                 strcpy(bkpinfo->nfs_remote_dir,getenv("dirimg"));
    991             }
     1003                mr_allocstr(bkpinfo->nfs_mount,envtmp1);
     1004                mr_allocstr(bkpinfo->nfs_remote_dir,envtmp2);
     1005        }
    9921006    } else if (bkpinfo->backup_media_type == iso) {
    9931007        /* Patch by Conor Daly 23-june-2004
Note: See TracChangeset for help on using the changeset viewer.