Changeset 2569 in MondoRescue for branches/2.2.10/mondo


Ignore:
Timestamp:
Feb 2, 2010, 10:40:28 AM (14 years ago)
Author:
Bruno Cornec
Message:

svn merge -r 2545:2567 /mondorescue/branches/2.2.9

  • Improve device exclusion for LVM by adding support for symlinks and mapper systematically at all levels (PV, VG, LV). Shoul

d really provvide the best support possible for LVM exclusion.

  • Now supports also exclusion of LVs directly
  • Improve mindi by handling excluded devices earlier in the loop.
  • Fix LV exclusion when VGs are excluded (the excludedvgs file has to be removed at start and end of analyze-my-lvm not in fu

nctions, as they are called multiple times)

  • Rename some variables exported to avoid accidental conflict (EXCLUDE_DEVS => MINDI_EXCLUDE_DEVS and ADDITIONAL_BOOT_PARAMS

=> MINDI_ADDITIONAL_BOOT_PARAMS)

  • setfattr also needs the -h flag to restore attributes on symlinks, not on the target file (which may not exist BTW). Should solve #388.
  • Using forcemods="mod1 mod2" will now do something and load those modules first
  • Update web page on distributions to download
  • Add support for ums_cypress module in mindi
  • Fix acl backup which was completely wrong.
  • Fix a bug where LV were not created anymore if no exclusion !!
  • In analyze-my-lvm only use pv.tmp2 when it exists to avoid error msgs

-Adds support for links to modules (.ko pointing to .o) such as with VMWare extensions

  • Adds i-want-my-lvm content in mindi log file
  • Adds vmxnet3 driver support to mindi for some VMWare versions
  • Fix a typo in the way device mapper files where excluded
  • use option -h of getfattr to *not* follow symlinks, which breaks RHEL 5.4 as reported in #388. However, getfacl doesn't provide such an option.
  • Adds some logs for filelist creation
  • Remove option -P from getfattr which may also skip symlinks - Attempt to solve #388
  • Exclude rpc_pipefs type of filesystems from find
  • Suppress unused mode_of_file function
Location:
branches/2.2.10/mondo/src/common
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/common/libmondo-filelist.c

    r2523 r2569  
    279279        }
    280280        if (siz > max_sane_size_for_a_file) {
     281            log_msg(10, "Adding %s to big files\n", incoming);
    281282            fprintf(fbig, "%s\n", incoming);
    282283        } else {
    283284            curr_set_size += siz;
     285            log_msg(10, "Adding %s to filelist %d\n", incoming, curr_set_no);
    284286            fprintf(fout, "%s\n", incoming);
    285287            if (curr_set_size > maxsetsizeK) {
     
    464466        mr_free(strtmp);
    465467
     468        log_msg(20,"calling %s\n",syscall);
    466469        call_exe_and_pipe_output_to_fd(syscall, pout);
    467470        mr_free(syscall);
     
    485488        mr_free(command);
    486489
    487         mr_asprintf(command, "getfacl --all-effective -P %s 2>> %s | gzip -c1 > %s 2>> %s", filelist, MONDO_LOGFILE, facl_fname, MONDO_LOGFILE);
    488         log_it("%s",command);
    489         retval = system(command);
    490         mr_free(command);
     490        retval =
     491            gen_aux_list(filelist, "getfacl --all-effective -P %s", facl_fname);
    491492    }
    492493    return (retval);
     
    504505        mr_free(command);
    505506        retval =
    506             gen_aux_list(filelist, "getfattr --en=hex -P -m - -d \"%s\"",
    507                          fattr_fname);
     507            gen_aux_list(filelist, "getfattr --en=hex -m - -h -d \"%s\"", fattr_fname);
    508508    }
    509509    return (retval);
     
    531531        || !does_file_exist(orig_msklist)) {
    532532        log_msg(1, "No masklist provided. I shall therefore set ALL attributes.");
    533         mr_asprintf(command, "gzip -dc %s | %s --restore - 2>> %s", original_exat_fname, executable, MONDO_LOGFILE);
     533        mr_asprintf(command, "gzip -dc %s | %s -h --restore - 2>> %s", original_exat_fname, executable, MONDO_LOGFILE);
    534534        log_msg(1, "command = %s", command);
    535535        retval = system(command);
     
    13561356#if linux
    13571357        // 2.6 has /sys as a proc-type thing -- must be excluded
    1358         mr_asprintf(strtmp, "find '%s' -fstype mvfs -prune -o -fstype devpts -prune -o -fstype tmpfs -prune -o -fstype proc -prune -o -fstype sysfs -prune -o %s -type d -print > %s 2> /dev/null", dir, find_excludes, g_skeleton_filelist);
     1358        mr_asprintf(strtmp, "find '%s' -fstype mvfs -prune -o -fstype devpts -prune -o -fstype tmpfs -prune -o -fstype proc -prune -o -fstype sysfs -prune -o -fstype rpc_pipefs -prune -o %s -type d -print > %s 2> /dev/null", dir, find_excludes, g_skeleton_filelist);
    13591359#else
    13601360        // On BSD, for example, /sys is the kernel sources -- don't exclude
  • branches/2.2.10/mondo/src/common/libmondo-files-EXT.h

    r2508 r2569  
    77extern unsigned int updcrcr(unsigned int crc, unsigned int c);
    88extern char *calc_checksum_of_file(char *filename);
    9 extern char *calc_file_ugly_minichecksum(char *curr_fname);
    109extern long count_lines_in_file(char *filename);
    1110extern bool does_file_exist(char *filename);
     
    4847extern int make_grub_install_scriptlet(char *outfile);
    4948extern int read_one_liner_data_file(char *fname, char *contents);
    50 extern int mode_of_file(char *fname);
  • branches/2.2.10/mondo/src/common/libmondo-files.c

    r2508 r2569  
    12701270
    12711271
    1272 int mode_of_file(char *fname)
    1273 {
    1274     struct stat buf;
    1275 
    1276     if (lstat(fname, &buf)) {
    1277         return (-1);
    1278     }                           // error
    1279     else {
    1280         return (buf.st_mode);
    1281     }
    1282 }
    1283 
    1284 
    1285 
    1286 
    12871272/**
    12881273 * Create a small script that mounts /boot, calls @c grub-install, and syncs the disks.
  • branches/2.2.10/mondo/src/common/libmondo-files.h

    r2508 r2569  
    99unsigned int updcrcr(unsigned int crc, unsigned int c);
    1010char *calc_checksum_of_file(char *filename);
    11 char *calc_file_ugly_minichecksum(char *curr_fname);
    12 char *calc_file_ugly_minichecksum(char *curr_fname);
    1311long count_lines_in_file(char *filename);
    1412bool does_file_exist(char *filename);
     
    4947
    5048int read_one_liner_data_file(char *fname, char *contents);
    51 int mode_of_file(char *fname);
Note: See TracChangeset for help on using the changeset viewer.