Changeset 802 in MondoRescue


Ignore:
Timestamp:
Sep 22, 2006, 6:36:52 PM (18 years ago)
Author:
Bruno Cornec
Message:

Attempt to fix bug #25

Location:
branches/stable
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mindi/rootfs/sbin/start-nfs

    r801 r802  
    33# $Id$
    44#
    5 # This script setup the network + NFS environment if needed.
     5# This script sets up the network + NFS environment if needed.
    66#
    77
  • branches/stable/mondo/mondo/common/libmondo-files.c

    r755 r802  
    12151215    /*@ buffers ******** */
    12161216    char nfs_dev[MAX_STR_LEN];
     1217    char mac_addr[MAX_STR_LEN];
    12171218    char nfs_mount[MAX_STR_LEN];
    12181219    char nfs_client_ipaddr[MAX_STR_LEN];
     
    12371238    strcpy(nfs_server_ipaddr, tmp);
    12381239    strcpy(nfs_mount, p);
     1240    /* BERLIOS : there is a bug #67 here as it only considers the first NIC */
    12391241    sprintf(command,
    12401242            "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\n' | head -n1 | cut -d' ' -f1");
     
    12641266    }
    12651267    make_hole_for_dir("/var/cache/mondo-archive");
     1268    /********
     1269    * If the NFS device that found above is a bonded device,
     1270    * we need to replace it with an ethN device or the
     1271    * networking will not start during an NFS restore.
     1272    *
     1273    * If the NFS device in nfs_dev begins with the word "bond",
     1274    * look for the corresponding slave ethN device and copy it to nfs_dev.
     1275    * Using the common MAC address
     1276    ********/
     1277    if (!strncmp(nfs_dev, "bond", 4)) {
     1278        log_to_screen("Found bonding device %s; looking for corresponding ethN slave device\n", nfs_dev);
     1279        sprintf(command,
     1280                "ifconfig %s | awk '{print $5}'", nfs_dev);
     1281        strcpy(mac_addr, call_program_and_get_last_line_of_output(command));
     1282        sprintf(command,
     1283                "ifconfig | grep -E '%s' | head -n1  | cut -d' ' -f1", mac_addr);
     1284        strcpy(nfs_dev, call_program_and_get_last_line_of_output(command));
     1285        log_to_screen("Replacing it with %s\n", nfs_dev);
     1286    }
    12661287
    12671288    sprintf(tmp, "%s/NFS-DEV", bkpinfo->tmpdir);
Note: See TracChangeset for help on using the changeset viewer.