Changeset 903 in MondoRescue for trunk/mondo/src


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

merge -r862:888 $SVN_M/branches/stable

Location:
trunk/mondo/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/src/common/libmondo-devices.c

    r900 r903  
    15781578            if (bkpinfo->media_device != NULL) {
    15791579                mr_asprintf(&tmp,
    1580                         _("I think I've found your %s burner at SCSI node %s; am I right on the money? Say no if you have an IDE burner and you are running a 2.6 kernel. Instead, specify the IDE burner's /dev address at the next screen."),
     1580                        _("I think I've found your %s burner at SCSI node %s; Is this correct ? (say no if you have an IDE burner and you are running a 2.6 kernel. You will then be prompted for further details."),
    15811581                        bkpinfo->backup_media_string,
    15821582                        bkpinfo->media_device);
  • trunk/mondo/src/common/libmondo-files.c

    r900 r903  
    11091109        log_to_screen("Found bonding device %s; looking for corresponding ethN slave device\n", nfs_dev);
    11101110        mr_asprintf(&command,
    1111                 "ifconfig %s | awk '{print $5}'", nfs_dev);
     1111                "ifconfig %s | awk '{print $5}' | head -n1", nfs_dev);
    11121112        mac_addr = call_program_and_get_last_line_of_output(command);
    11131113        mr_asprintf(&command,
    1114                 "ifconfig | grep -E '%s' | head -n1  | cut -d' ' -f1", mac_addr);
     1114                "ifconfig | grep -E '%s' | grep -v '%s' | head -n1  | cut -d' ' -f1", mac_addr);
    11151115        mr_free(nfs_dev);
    11161116        nfs_dev = call_program_and_get_last_line_of_output(command);
  • 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.