Changeset 794 in MondoRescue for trunk/mondo


Ignore:
Timestamp:
Sep 14, 2006, 1:05:18 AM (18 years ago)
Author:
Bruno Cornec
Message:

merge -r781:793 $SVN_M/branches/stable

Location:
trunk/mondo
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/ChangeLog

    r788 r794  
    33MONDO CHANGES
    44
    5 3.0.0 (2006-08-30)
     53.0.0 (2006-09-30)
    66- indent on source files
    77- asprintf used instead of malloc_string + sprintf/strcpy/strcat without verifications. Optimisations on memory consumption (allocate only size needed + remove memory leaks) (Bruno Cornec)
    88- Internationalization (A huge thank to rene-marc dolhen <rmd_at_mecreant.org> who achieved that big task)
     9
     102.2.0 (2006-09-05)
    911
    10122.0.9 (2006-08-04)
  • trunk/mondo/README

    r764 r794  
    5050
    5151Apart from the above-mentioned documentation, there is a Wiki with growing
    52 contents at the following URL: http://www.mondorescue.org/cgi-bin/trac.cgi/wiki
     52contents at the following URL: http://trac.mondorescue.org
    5353
    5454Also, there is a mailing list mondo-devel@lists.sourceforge.net. Please go to
  • trunk/mondo/mondo/common/libmondo-devices.c

    r783 r794  
    20242024{
    20252025    return(call_program_and_get_last_line_of_output
    2026            ("mount -t coda,ncpfs,nfs,smbfs,cifs,mvfs | tr -s '\t' ' ' | cut -d' ' -f3 | tr -s '\n' ' ' | awk '{print $0;}'"));
     2026           ("mount -t coda,ncpfs,nfs,smbfs,cifs,afs,mvfs | tr -s '\t' ' ' | cut -d' ' -f3 | tr -s '\n' ' ' | awk '{print $0;}'"));
    20272027    /* BERLIOS : Useless
    20282028    asprintf(&exclude_these_devices,
    20292029           call_program_and_get_last_line_of_output
    2030            ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs|mvfs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'"));
     2030           ("tr -s '\t' ' ' < /etc/fstab | grep -E '( (coda|ncpfs|nfs|smbfs|cifs|afs|mvfs) )' | cut -d' ' -f1 | tr -s '\n' ' ' | awk '{print $0;}'"));
    20312031           */
    20322032}
     
    20522052#ifdef __FreeBSD__
    20532053    tmp = call_program_and_get_last_line_of_output
    2054            ("df -m -P -t nonfs,msdosfs,ntfs,smbfs,smb,cifs,mvfs | tr -s '\t' ' ' | grep -vE \"none|Filesystem\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'");
     2054           ("df -m -P -t nonfs,msdosfs,ntfs,smbfs,smb,cifs,afs,mvfs | tr -s '\t' ' ' | grep -vE \"none|Filesystem\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'");
    20552055#else
    20562056    tmp = call_program_and_get_last_line_of_output
    2057            ("df -m -P -x nfs -x vfat -x ntfs -x smbfs -x smb -x cifs -x mvfs | sed 's/                  /devdev/' | tr -s '\t' ' ' | grep -vE \"none|Filesystem|/dev/shm\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'");
     2057           ("df -m -P -x nfs -x vfat -x ntfs -x smbfs -x smb -x cifs -x afs -x mvfs | sed 's/                  /devdev/' | tr -s '\t' ' ' | grep -vE \"none|Filesystem|/dev/shm\" | awk '{printf \"%s %s\\n\", $4, $6;}' | sort -n | tail -n1 | awk '{print $NF;}'");
    20582058#endif
    20592059
  • trunk/mondo/mondo/common/libmondo-fifo.c

    r688 r794  
    5555/* @} - end of globalGroup */
    5656
     57extern char *ps_options;
    5758
    5859/**
     
    129130    }
    130131    sleep(2);
    131     asprintf(&tmp, "ps wwax | grep \"%s\"", g_sz_call_to_buffer);
     132    asprintf(&tmp, "ps %s | grep \"%s\"", ps_options, g_sz_call_to_buffer);
    132133    if (run_program_and_log_output(tmp, 2)) {
    133134        log_msg(2, "Warning - I think I failed to open tape, actually.");
     
    135136    paranoid_free(tmp);
    136137    g_tape_buffer_size_MB = bufsize;
    137     /* BERLIOS: usless ?
    138        strcmp(tmp, g_sz_call_to_buffer);
    139        tmp[30] = '\0';
    140      */
    141     asprintf(&tmp, "ps wwax | grep buffer | grep -v grep");
     138    asprintf(&tmp, "ps %s | grep buffer | grep -v grep", ps_options);
    142139    if (run_program_and_log_output(tmp, 1)) {
    143140        fres = NULL;
     
    161158    sync();
    162159    asprintf(&command,
    163             "ps wwax | grep -F \"%s\" | grep -Fv grep | awk '{print $1;}' | grep -v PID | tr -s '\n' ' ' | awk '{ print $1; }'",
     160            "ps | grep -F \"%s\" | grep -Fv grep | awk '{print $1;}' | grep -v PID | tr -s '\n' ' ' | awk '{ print $1; }'", ps_options,
    164161            g_sz_call_to_buffer);
    165162    paranoid_free(g_sz_call_to_buffer);
  • trunk/mondo/mondo/common/libmondo-filelist.c

    r783 r794  
    13501350        // 2.6 has /sys as a proc-type thing -- must be excluded
    13511351        asprintf(&tmp,
    1352                 "find %s -maxdepth %d -fstype mvfs -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",
     1352                "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",
    13531353                 dir, MAX_SKEL_DEPTH, skeleton_filelist);
    13541354#else
    13551355        // On BSD, for example, /sys is the kernel sources -- don't exclude
    13561356        asprintf(&tmp,
    1357                 "find %s -maxdepth %d -fstype mvfs -prune -o -path /proc -prune -o -type d -a -print > %s 2> /dev/null",
     1357                "find %s -maxdepth %d -fstype mvfs -prune -o -fstype afs -prune -o -path /proc -prune -o -type d -a -print > %s 2> /dev/null",
    13581358                 dir, MAX_SKEL_DEPTH, skeleton_filelist);
    13591359#endif
  • trunk/mondo/mondo/common/newt-specific.c

    r783 r794  
    3232extern char *g_tmpfs_mountpt;
    3333extern char *g_mondo_home;
     34    extern char *ps_options;
    3435
    3536extern void set_signals(int);
     
    232233    }
    233234
     235/**
     236 * Kill any process containing the string @p str surrounded by spaces in its commandline.
     237 */
     238void kill_anything_like_this(char *str) {
     239
     240char *tmp = NULL;
     241
     242asprintf(&tmp,"kill `ps %s | grep \"" %s "\" | awk '{print $1;}' | grep -vx \"\\?\"`", ps_options, str);
     243run_program_and_log_output(tmp, TRUE);
     244paranoid_free(tmp);
     245}
    234246
    235247/**
  • trunk/mondo/mondo/mondoarchive/main.c

    r783 r794  
    3939bool g_skip_floppies;
    4040long diffs;
     41char *ps_options = "auxww";
    4142
    4243extern int g_loglevel;
  • trunk/mondo/mondo/mondorestore/mondo-restore.c

    r783 r794  
    122122 */
    123123char *g_mondo_home = NULL;
     124
     125char *ps_options = "";
    124126
    125127/* @} - end of "Restore-Time Globals" in globalGroup */
  • trunk/mondo/mondo/mondorestore/mondo-rstr-tools.c

    r783 r794  
    369369    char *command;
    370370    asprintf(&command,
    371             "kill `ps wax 2> /dev/null | grep petris 2> /dev/null | grep -v grep | cut -d' ' -f2` 2> /dev/null");
     371            "kill `ps 2> /dev/null | grep petris 2> /dev/null | grep -v grep | cut -d' ' -f2` 2> /dev/null");
    372372    paranoid_system(command);
    373373    paranoid_free(command);
     
    19851985         &&
    19861986         run_program_and_log_output
    1987          ("ps wax | grep buffer | grep -v \"grep buffer\"", TRUE) == 0;
     1987         ("ps | grep buffer | grep -v \"grep buffer\"", TRUE) == 0;
    19881988         i++) {
    19891989        sleep(1);
Note: See TracChangeset for help on using the changeset viewer.