Changeset 4839 in /cluster/svnroot


Ignore:
Timestamp:
Jul 29, 2014 9:22:03 PM (6 years ago)
Author:
skylar
Message:

removing mail dependency in bccd-report (#859)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/skylar/bccd-3.3.2/trees/bin/bccd-report

    r4348 r4839  
    3131fi
    3232
    33 while getopts "nh" opt; do
     33while getopts "h" opt; do
    3434        case $opt in
    35                 n )
    36                         OUTFILE=~bccd/bccd-report.tar.bz2
    37                         ;;
    3835                h )
    3936                        HELP=1
     
    5148
    5249TMPDIR=$(/bin/mktemp --tmpdir=/var/tmp -d bccd-report.XXXXXXX)
     50OUTFILE=~bccd/bccd-report.tar.bz2
    5351
    5452/sbin/ifconfig -a > $TMPDIR/ifconfig_a.txt
    5553/bin/lsmod > $TMPDIR/lsmod.txt
    5654/bin/ls -l /diskless/clients > $TMPDIR/diskless_clients.txt
    57 /bin/tar -C / -cf $TMPDIR/etc.tar /etc
    58 /bin/tar -C / -cf $TMPDIR/var_log.tar /var/log
     55/bin/tar -C / -cf $TMPDIR/etc.tar etc
     56/bin/tar -C / -cf $TMPDIR/var_log.tar var/log
    5957/bin/dmesg > $TMPDIR/dmesg.txt
    6058/bin/ps waux > $TMPDIR/ps_waux.txt
     
    6563/bin/netstat -apn > $TMPDIR/netstat_apn.txt
    6664
    67 if [[ -n ${OUTFILE} ]]; then
    68         /bin/tar -C $TMPDIR -cf - .| \
    69                 nice pbzip2 > ${OUTFILE}
    70         /bin/chown bccd:bccd ${OUTFILE}
    71 else
    72         /bin/tar -C $TMPDIR -cf - .| \
    73                 nice pbzip2 | \
    74                 uuencode - | \
    75                 mail -s "bccd-report for $(hostid)" bccd-developers@bccd.net
    76 fi
     65/bin/tar -C $TMPDIR -cf - .| \
     66        nice pbzip2 > ${OUTFILE}
     67/bin/chown bccd:bccd ${OUTFILE}
     68
     69echo "Generated ${OUTFILE}, copy off using " >&2
     70echo "http://bccd.net/wiki/index.php/UserInstructions#USB_mounting" >&2
Note: See TracChangeset for help on using the changeset viewer.