Changeset 2475 in MondoRescue


Ignore:
Timestamp:
Nov 10, 2009, 2:52:43 PM (14 years ago)
Author:
Bruno Cornec
Message:
  • Update deplist for Debian support
  • Fix #363 where exclude_paths was extended up to memory limit dumping core
  • Default to DVD size when in iso or netfs mode
  • Improve analysis of kernel modules by printing whether it's a live or extra module which has not been found (Matthew Cline) as reported in #362
  • Remove useless pb_log and MONDO_TRACEFILE
  • /dev/shm is now part of the default exclude list
  • some distro hold lvm commands under /usr/sbin
  • bzip2 is under /bin on Debian

(merge from 2.2.9 branch)

Location:
branches/2.2.10
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mindi/deplist.d/base.conf

    r2460 r2475  
    3939
    4040# Compressors
     41# On RHEL
    4142/usr/bin/bzip2
     43# On Debian
     44/bin/bzip2
    4245# is a link => No additional place
    4346/usr/bin/bunzip2
  • branches/2.2.10/mindi/deplist.d/lvm.conf

    r2409 r2475  
    5050/sbin/lvs
    5151/sbin/lvscan
     52
     53/usr/sbin/pvchange
     54/usr/sbin/pvcreate
     55/usr/sbin/pvdisplay
     56/usr/sbin/pvmove
     57/usr/sbin/pvremove
     58/usr/sbin/pvresize
     59/usr/sbin/pvs
     60/usr/sbin/pvscan
     61
     62/usr/sbin/vgcfgbackup
     63/usr/sbin/vgcfgrestore
     64/usr/sbin/vgchange
     65/usr/sbin/vgck
     66/usr/sbin/vgconvert
     67/usr/sbin/vgcreate
     68/usr/sbin/vgdisplay
     69/usr/sbin/vgexport
     70/usr/sbin/vgextend
     71/usr/sbin/vgimport
     72/usr/sbin/vgmerge
     73/usr/sbin/vgmknodes
     74/usr/sbin/vgreduce
     75/usr/sbin/vgremove
     76/usr/sbin/vgrename
     77/usr/sbin/vgs
     78/usr/sbin/vgscan
     79/usr/sbin/vgsplit
     80
     81/usr/sbin/lvchange
     82/usr/sbin/lvcreate
     83/usr/sbin/lvdisplay
     84/usr/sbin/lvextend
     85/usr/sbin/lvmchange
     86/usr/sbin/lvmdiskscan
     87/usr/sbin/lvmsadc
     88/usr/sbin/lvmsar
     89/usr/sbin/lvreduce
     90/usr/sbin/lvremove
     91/usr/sbin/lvrename
     92/usr/sbin/lvresize
     93/usr/sbin/lvs
     94/usr/sbin/lvscan
  • branches/2.2.10/mindi/deplist.d/minimal.conf

    r2462 r2475  
    1212/usr/bin/awk
    1313/bin/gawk
     14# On Debian
     15/usr/bin/awk
     16/usr/bin/gawk
     17/bin/dd
    1418/bin/grep
    1519/bin/uname
  • branches/2.2.10/mindi/mindi

    r2462 r2475  
    736736###
    737737    noof_lines=0
    738     for module in $module_list $EXTRA_MODS ; do
     738    # Get rid of duplicates, so that if a live kernel module also appears
     739    # in $EXTRA_MODS that it won't get reported as "live module file not found" twice.
     740    for module in `echo $module_list $EXTRA_MODS | tr ' ' '\n' | sort -u` ; do
    739741        noof_lines=$(($noof_lines+1))
    740742    done
    741743    progress=0
    742     for module in $module_list $EXTRA_MODS ; do
     744    for module in `echo $module_list $EXTRA_MODS | tr ' ' '\n' | sort -u` ; do
    743745        r=`find /lib/modules/$kern -type f | grep "/${module}\..*o" | tail -n1`
     746        if [ -z "$r" ]; then
     747            if [ "`echo "$MODULES" | grep -w $module`" ]; then
     748                r="[live module file not found]"
     749            else
     750                r="[extra module file not found]"
     751            fi
     752        fi
    744753        LogFile "module $module --> $r"
    745754        [ "$r" ] && echo "$r" >> $outfile
  • branches/2.2.10/mondo/src/common/libmondo-devices.c

    r2462 r2475  
    19061906char *mounted_on_dsf = NULL;
    19071907char *not_mounted_on_dsf = NULL;
    1908 char token_chars[] =" \t\r\f\a\0";
     1908char token_chars[] =" \t\r\f\a\0\n";
    19091909
    19101910while ((token = mr_strtok(pathlist, token_chars, &lastpos)) != NULL) {
     
    19251925                log_to_screen("  %s\n", mounted_on_dsf);
    19261926                log_msg (5, "Adding to bkpinfo->exclude_paths due to -E option: %s", mounted_on_dsf);
    1927                 mr_strcat(bkpinfo->exclude_paths, "%s ", mounted_on_dsf);
     1927                mr_strcat(bkpinfo->exclude_paths, " %s ", mounted_on_dsf);
    19281928                mr_strcat(bkpinfo->exclude_devs, " %s ", token);
    19291929            }
     
    19361936                log_to_screen("Not archiving the following file systems:\n");
    19371937                log_to_screen("  %s\n", not_mounted_on_dsf);
    1938                 strcat(bkpinfo->exclude_paths, not_mounted_on_dsf);
    1939                 strcat(bkpinfo->exclude_paths, "");
     1938                mr_strcat(bkpinfo->exclude_paths, " %s ", mounted_on_dsf);
    19401939            }
    19411940        }
     
    19481947    case -1:
    19491948        if (mode == 'E') {
    1950             mr_strcat(bkpinfo->exclude_paths, "%s ", token);
     1949            /*  Add the token if not already in the list */
     1950            if (strstr(bkpinfo->exclude_paths,token) == NULL) {
     1951                mr_strcat(bkpinfo->exclude_paths, " %s ", token);
     1952            }
    19511953        } else {
    1952             mr_strcat(bkpinfo->include_paths, "%s ", token);
     1954            /*  Add the token if not already in the list */
     1955            if (strstr(bkpinfo->include_paths,token) == NULL) {
     1956                mr_strcat(bkpinfo->include_paths, " %s ", token);
     1957            }
    19531958        }
    19541959        break;
     
    28192824            if (!bkpinfo->restore_data) {
    28202825                mr_asprintf(comment, "How much data (in Megabytes) will each media store?");
    2821                 // BERLIOS: 4480 shouldn't be hardcoded here
    2822                 sz_size = popup_and_get_string("Size", comment, "4480");
     2826                mr_asprintf(tmp, "%d", DEFAULT_DVD_DISK_SIZE);
     2827                sz_size = popup_and_get_string("Size", comment, tmp);
    28232828                mr_free(comment);
     2829                mr_free(tmp);
    28242830                if (sz_size == NULL) {
    28252831                    log_to_screen("User has chosen not to backup the PC");
     
    29322938                    finish(1);
    29332939                }
    2934                 p = popup_and_get_string("ISO size.", "Please enter how big you want each ISO image to be (in megabytes). This should be less than or equal to the size of the CD-R[W]'s or DVD's you plan to backup to.", sz_size);
     2940                mr_asprintf(tmp, "%d", DEFAULT_DVD_DISK_SIZE);
     2941                p = popup_and_get_string("ISO size.", "Please enter how big you want each ISO image to be (in megabytes). This should be less than or equal to the size of the CD-R[W]'s (700) or DVD's (4480) you plan to backup to.", tmp);
     2942                mr_free(tmp);
    29352943                if (p == NULL) {
    29362944                    log_to_screen("User has chosen not to backup the PC");
     
    31163124    }
    31173125    log_it("compression = %ld", bkpinfo->compression_level);
     3126    log_it("exclude_path = %s", bkpinfo->exclude_paths);
     3127    log_it("include_path = %s", bkpinfo->include_paths);
    31183128
    31193129    /* Handle devices passed in bkpinfo and print result */
    3120     mr_make_devlist_from_pathlist(bkpinfo->exclude_paths, 'E');
    3121     mr_make_devlist_from_pathlist(bkpinfo->include_paths, 'I');
     3130    /*  the mr_make_devlist_from_pathlist function appends
     3131    *  to the *_paths variables so copy before */
     3132    mr_asprintf(tmp, "%s ", bkpinfo->exclude_paths);
     3133    mr_make_devlist_from_pathlist(tmp, 'E');
     3134    mr_free(tmp);
     3135    mr_asprintf(tmp, "%s ", bkpinfo->include_paths);
     3136    mr_make_devlist_from_pathlist(tmp, 'I');
     3137    mr_free(tmp);
    31223138
    31233139    log_it("scratchdir = '%s'", bkpinfo->scratchdir);
  • branches/2.2.10/mondo/src/common/libmondo-filelist.c

    r2462 r2475  
    15771577        mr_free(tmp1);
    15781578
    1579         mr_asprintf(exclude_paths, " %s %s %s %s %s . ..  " MNT_CDROM " " MNT_FLOPPY " /media /tmp  /proc /sys " MINDI_CACHE, MONDO_CACHE, (excp == NULL) ? "" : excp, tmp2, (bkpinfo->tmpdir[0] == '/' && bkpinfo->tmpdir[1] == '/') ? (bkpinfo->tmpdir + 1) : bkpinfo->tmpdir, (bkpinfo->scratchdir[0] == '/' && bkpinfo->scratchdir[1] == '/') ? (bkpinfo->scratchdir + 1) : bkpinfo->scratchdir);
     1579        mr_asprintf(exclude_paths, " %s %s %s %s %s . ..  " MNT_CDROM " " MNT_FLOPPY " /media /tmp  /proc /sys /dev/shm " MINDI_CACHE, MONDO_CACHE, (excp == NULL) ? "" : excp, tmp2, (bkpinfo->tmpdir[0] == '/' && bkpinfo->tmpdir[1] == '/') ? (bkpinfo->tmpdir + 1) : bkpinfo->tmpdir, (bkpinfo->scratchdir[0] == '/' && bkpinfo->scratchdir[1] == '/') ? (bkpinfo->scratchdir + 1) : bkpinfo->scratchdir);
    15801580        mr_free(tmp2);
    15811581
  • branches/2.2.10/mondo/src/common/libmondo-tools-EXT.h

    r2421 r2475  
    1717extern void initialize_raidrec(struct raid_device_record *raidrec);
    1818#endif
    19 extern void log_trace(char *o);
    2019extern int some_basic_system_sanity_checks();
    2120
  • branches/2.2.10/mondo/src/common/libmondo-tools.c

    r2462 r2475  
    313313
    314314/**
    315  * Log a trace message to the trace file.
    316  * @bug This function seems orphaned. Please remove.
    317  */
    318 void log_trace(char *o)
    319 {
    320     /*@ pointers **************************************************** */
    321     FILE *fout;
    322 
    323     /*@ buffers ***************************************************** */
    324     char output[MAX_STR_LEN];
    325 
    326     /*@ int    ****************************************************** */
    327     int i;
    328 
    329     /*@ end vars *************************************************** */
    330 
    331     if (o[0] == '\0') {
    332         return;
    333     }
    334     strcpy(output, o);
    335     i = (int) strlen(output);
    336     if (i <= 0) {
    337         return;
    338     }
    339     if (output[i - 1] < 32) {
    340         output[i - 1] = '\0';
    341     }
    342     if (g_text_mode) {
    343         printf("%s\n", output);
    344     }
    345 
    346     fout = fopen(MONDO_TRACEFILE, "a");
    347     if (fout) {
    348         fprintf(fout, "%s\n", output);
    349         paranoid_fclose(fout);
    350     } else {
    351         log_OS_error("Cannot write to tracefile");
    352     }
    353 }
    354 
    355 
    356 
    357 
    358 
    359 /**
    360315 * Finish configuring the backup information structure. Call this function
    361316 * to set the parameters that depend on those that can be given on the command
     
    711666    }
    712667
    713     unlink(MONDO_TRACEFILE);
    714668    mr_asprintf(tmp,"rm -Rf %s/changed.files*",MONDO_CACHE);
    715669    run_program_and_log_output(tmp, FALSE);
  • branches/2.2.10/mondo/src/common/libmondo-tools.h

    r2421 r2475  
    2020void initialize_raidrec(struct raid_device_record *raidrec);
    2121#endif
    22 void log_trace(char *o);
    2322int some_basic_system_sanity_checks();
    2423
  • branches/2.2.10/mondo/src/include/my-stuff.h

    r2462 r2475  
    8686 */
    8787#define MDSTAT_FILE "/proc/mdstat"
    88 
    89 /**
    90  * @bug Apparently unused.
    91  */
    92 #define MONDO_TRACEFILE "/var/log/mondo-tracefile.log"
    9388
    9489#ifdef __FreeBSD__
Note: See TracChangeset for help on using the changeset viewer.