- Timestamp:
- Sep 22, 2006, 6:36:52 PM (18 years ago)
- Location:
- branches/stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mindi/rootfs/sbin/start-nfs
r801 r802 3 3 # $Id$ 4 4 # 5 # This script set up the network + NFS environment if needed.5 # This script sets up the network + NFS environment if needed. 6 6 # 7 7 -
branches/stable/mondo/mondo/common/libmondo-files.c
r755 r802 1215 1215 /*@ buffers ******** */ 1216 1216 char nfs_dev[MAX_STR_LEN]; 1217 char mac_addr[MAX_STR_LEN]; 1217 1218 char nfs_mount[MAX_STR_LEN]; 1218 1219 char nfs_client_ipaddr[MAX_STR_LEN]; … … 1237 1238 strcpy(nfs_server_ipaddr, tmp); 1238 1239 strcpy(nfs_mount, p); 1240 /* BERLIOS : there is a bug #67 here as it only considers the first NIC */ 1239 1241 sprintf(command, 1240 1242 "ifconfig | tr '\n' '#' | sed s/##// | tr '#' ' ' | tr '' '\n' | head -n1 | cut -d' ' -f1"); … … 1264 1266 } 1265 1267 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 } 1266 1287 1267 1288 sprintf(tmp, "%s/NFS-DEV", bkpinfo->tmpdir);
Note:
See TracChangeset
for help on using the changeset viewer.