#!/bin/bash # # rpt_info_dump # # All Rights Reserved. Copyright (C)2008 Xelatec, L.L.C. # http://www.xelatec.com/ # # 20080224 1620 Steven Henke sphenke@xelatec.com # # Only compatible with EasyVoxBox 0.010 & 0.011 ! # # # $Date: 2008-01-30 09:45:33 -0500 (Wed, 30 Jan 2008) $ # $Revision: 409 $ # $Author: shenke $ # # cd /usr/local/bin # rm svn_2_app_rpt # wget -r http://xelatec.com/asterisk/svn_2_app_rpt # # # grep $target $conf > /dev/null 2>&1 # res=$? # if [ $res = 1 ] is true if not found # DUMPDIR=/tmp DUMPFILE=/tmp/rpt_info.txt SCRATCHFILE=/tmp/scratch BUILDON=/etc/EVB/EVBrpt_build.txt # function dumptarget { if [ -e $target ]; then echo "***********************************" >> $DUMPFILE echo "file cat of: $target" >> $DUMPFILE echo "***********************************" >> $DUMPFILE cat $target >> $DUMPFILE else echo "***********************" >> $DUMPFILE echo "file $target not found." >> $DUMPFILE echo "***********************" >> $DUMPFILE fi } # function afvers { echo -n "$target " >> $DUMPFILE grep 'ASTERISK_FILE_VERSION' $target >> $DUMPFILE } # # echo "" echo "" echo rpt_info_dump starting... echo "" echo "Please use the following information to fill in the required fields" echo "when entering a bug report at" echo "http://www.xelatec.com/xmantis/" echo "" # # Displayed Info # echo -n "Platform " grep 'model name' /proc/cpuinfo # echo -n "OS: " uname -o # echo -n "OS Version: " echo "$(uname -r) (enter as much as will fit)" # echo -n "Product Build: " if [ -e $BUILDON ]; then cat $BUILDON else echo "unknown" fi echo "Assign To: (leave blank)" # echo "Software Version: (enter \"see attached\")" # svn info /usr/src/svnwork/asterisk > $SCRATCHFILE echo -n "SVN Branch " grep 'URL:' $SCRATCHFILE # echo -n "SVN " grep 'Revision:' $SCRATCHFILE # echo "View Status: public" # # Logged Info # echo "*" > $DUMPFILE echo "********************************************************************" >> $DUMPFILE echo "* rpt info report $(date +%Y%m%d%k%M)" >> $DUMPFILE echo "********************************************************************" >> $DUMPFILE uname -a >> $DUMPFILE # cat /proc/version >> $DUMPFILE grep 'vendor_id' /proc/cpuinfo >> $DUMPFILE grep 'model name' /proc/cpuinfo >> $DUMPFILE grep 'cpu MHz' /proc/cpuinfo >> $DUMPFILE grep 'bogomips' /proc/cpuinfo >> $DUMPFILE grep 'MemTotal' /proc/meminfo >> $DUMPFILE grep 'MemFree:' /proc/meminfo >> $DUMPFILE ifconfig | grep 'inet addr' | sed -e 's/^[ \t]*//' >> $DUMPFILE ping -c2 www.xelatec.com | grep 'bytes' >> $DUMPFILE target=/usr/src/asterisk/main/asterisk.c afvers target=/usr/src/asterisk/apps/app_rpt.c afvers target=/usr/src/asterisk/channels/chan_usbradio.c afvers target=/usr/src/asterisk/include/asterisk/version.h grep 'ASTERISK_VERSION' $target >> $DUMPFILE # #target=/usr/src/asterisk/include/asterisk/version.h #dumptarget # echo "svn info" >> $DUMPFILE svn info /usr/src/svnwork/asterisk > $SCRATCHFILE cat $SCRATCHFILE >> $DUMPFILE # target=/etc/EVB/EVBrev dumptarget # target=/etc/EVB/EVBrptlog.txt dumptarget # target=/etc/EVB/rpt_lastsvnpath dumptarget # target=/etc/asterisk/rpt.conf dumptarget # target=/etc/asterisk/usbradio.conf dumptarget # echo "********************************************************************" >> $DUMPFILE echo "* end of rpt info report $(date +%Y%m%d%k%M)" >> $DUMPFILE echo "********************************************************************" >> $DUMPFILE echo "" >> $DUMPFILE echo "" sed -i 's/.*=remote,99,.*/;##REMOTE ACCESS CODE REMOVED FOR SECURITY##/' $DUMPFILE # echo "rpt_info_dump output sent to file: $DUMPFILE" echo "Please attach this file to any bug reports at" echo "http://www.xelatec.com/xmantis/" echo "" echo "rpt_info_dump complete." echo "" # # end of file #