- Timestamp:
- Sep 23, 2006, 2:41:00 PM (19 years ago)
- Location:
- branches/stable/mondo/mondo/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/mondo/common/libmondo-devices.c
r804 r820 2436 2436 strcpy(exclude_these_devices, 2437 2437 call_program_and_get_last_line_of_output 2438 ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs| afs|mvfs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'"));2438 ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs|mvfs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'")); 2439 2439 sprintf(result_sz, "%s %s", exclude_these_directories, 2440 2440 exclude_these_devices); … … 2466 2466 strcpy(exclude_these_devices, 2467 2467 call_program_and_get_last_line_of_output 2468 ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs| afs|mvfs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'"));2468 ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs|mvfs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'")); 2469 2469 sprintf(result_sz, "%s", exclude_these_directories); 2470 2470 paranoid_free(exclude_these_devices); -
branches/stable/mondo/mondo/common/libmondo-filelist.c
r787 r820 1487 1487 time_t time_of_last_full_backup) 1488 1488 { 1489 const char delims[] = " "; 1490 1489 1491 DIR *dip; 1490 1492 struct dirent *dit; … … 1497 1499 char *skip_these; 1498 1500 char *new_with_spaces; 1501 char *strtmp; 1502 char *token; 1503 char *find_excludes; 1499 1504 static char *name_of_evalcall_form; 1500 1505 int i; 1506 int lastpos = 0; 1501 1507 static int depth = 0; 1502 1508 char *p; … … 1522 1528 malloc_string(name_of_evalcall_form); 1523 1529 malloc_string(find_skeleton_marker); 1530 asprintf(&find_excludes, " "); 1531 while((token = mr_strtok (sth, delims, &lastpos))) { 1532 asprintf(&strtmp,"%s", find_excludes); 1533 paranoid_free(find_excludes); 1534 asprintf(&find_excludes,"%s -path %s -prune -o", strtmp, token); 1535 paranoid_free(strtmp); 1536 paranoid_free(token); 1537 } 1524 1538 #if linux 1525 1539 // 2.6 has /sys as a proc-type thing -- must be excluded 1526 sprintf(tmp,1527 "find %s -maxdepth %d -fstype mvfs -prune -o -fstype afs -prune -o -path /proc -prune -o -path /sys -prune -o -path /dev/shm -prune -o -path /media/floppy -prune -o-type d -a -print > %s 2> /dev/null",1528 dir, MAX_SKEL_DEPTH, g_skeleton_filelist);1540 asprintf(&strtmp, 1541 "find %s -maxdepth %d -fstype mvfs -path /dev/shm -prune -o %s -type d -a -print > %s 2> /dev/null", 1542 dir, MAX_SKEL_DEPTH, find_excludes, g_skeleton_filelist); 1529 1543 #else 1530 1544 // On BSD, for example, /sys is the kernel sources -- don't exclude 1531 sprintf(tmp,1532 "find %s -maxdepth %d -fstype mvfs -prune -o -fstype afs -prune -o -path /proc -prune -o-type d -a -print > %s 2> /dev/null",1533 dir, MAX_SKEL_DEPTH, g_skeleton_filelist);1545 asprintf(&strtmp, 1546 "find %s -maxdepth %d -fstype mvfs -prune -o -path /proc -prune -o %s -type d -a -print > %s 2> /dev/null", 1547 dir, MAX_SKEL_DEPTH, find_excludes, g_skeleton_filelist); 1534 1548 #endif 1535 system(tmp); 1549 paranoid_free(find_excludes); 1550 log_msg(5, "find command = %s", strtmp); 1551 system(strtmp); 1552 paranoid_free(strtmp); 1536 1553 sprintf(tmp, "wc -l %s | awk '{print $1;}'", g_skeleton_filelist); 1537 1554 g_skeleton_entries =
Note:
See TracChangeset
for help on using the changeset viewer.