Changeset 820 for branches


Ignore:
Timestamp:
Sep 23, 2006, 2:41:00 PM (13 years ago)
Author:
andree
Message:

AFS support tweaking:

  • don't scan fstab for AFS - AFS volumes don't appear in fstab;
  • don't exclude AFS volumes per se in open_and_list_dir(), rather don't scan any directories that have been excluded - can generally improve scan times if '-N' or '-E' is used, i.e. not AFS specific (but required for AFS!).
Location:
branches/stable/mondo/mondo/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/mondo/common/libmondo-devices.c

    r804 r820  
    24362436    strcpy(exclude_these_devices,
    24372437           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;}'"));
    24392439    sprintf(result_sz, "%s %s", exclude_these_directories,
    24402440            exclude_these_devices);
     
    24662466    strcpy(exclude_these_devices,
    24672467           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;}'"));
    24692469    sprintf(result_sz, "%s", exclude_these_directories);
    24702470    paranoid_free(exclude_these_devices);
  • branches/stable/mondo/mondo/common/libmondo-filelist.c

    r787 r820  
    14871487                      time_t time_of_last_full_backup)
    14881488{
     1489    const char delims[] = " ";
     1490
    14891491    DIR *dip;
    14901492    struct dirent *dit;
     
    14971499    char *skip_these;
    14981500    char *new_with_spaces;
     1501    char *strtmp;
     1502    char *token;
     1503    char *find_excludes;
    14991504    static char *name_of_evalcall_form;
    15001505    int i;
     1506    int lastpos = 0;
    15011507    static int depth = 0;
    15021508    char *p;
     
    15221528        malloc_string(name_of_evalcall_form);
    15231529        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        }
    15241538#if linux
    15251539        // 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);
    15291543#else
    15301544        // 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);
    15341548#endif
    1535         system(tmp);
     1549        paranoid_free(find_excludes);
     1550        log_msg(5, "find command = %s", strtmp);
     1551        system(strtmp);
     1552        paranoid_free(strtmp);
    15361553        sprintf(tmp, "wc -l %s | awk '{print $1;}'", g_skeleton_filelist);
    15371554        g_skeleton_entries =
Note: See TracChangeset for help on using the changeset viewer.