#!/bin/bash
#
# Module:   bug_report.sh
# Purpose:  to build a simple template for a bug report
# Author:   Wade Hampton
# Date:     4/9/2001
# History:  [from RCS]
# $Log: bug_report.sh,v $
# Revision 1.1  2001/04/09 14:59:34  wadeh
# Initial revision
#
#
# Notes:  
# 1)  The contents were stolen from /usr/src/linux/REPORTING-BUGS
#     from the Linux kernel 2.4.3.
# 2)  Output is to stdout.
# 3)  This assumes that the program ver_linux is in /usr/src/linux/scripts
#     and has been properly setup.  If not, change VER_LINUX variable.
#
# Copyright:  GPL
#
#----------------------------------------------------------------------
# CUSTOMIZATION STUFF HERE!
# define how to run the ver_linux script
VER_LINUX="/bin/bash /usr/src/linux/scripts/ver_linux"

# get info on this host
HOSTNAME=`hostname`

# current date
DDATE=`date`
#
# lspci -vvv should be run as root.... 
LSPCI='/sbin/lspci -vvv'
#
#----------------------------------------------------------------------
# START THE OUTPUT

echo "BUG report for $HOSTNAME on $DDATE"
echo "[1.] One line summary of the problem:    "
echo "--"
echo 

echo "[2.] Full description of the problem/report:"
echo "--"
echo 

echo "[3.] Keywords (i.e., modules, networking, kernel):"
echo "--"
echo 

echo "[4.] Kernel version (from /proc/version):"
cat /proc/version
echo 

echo "[5.] Output of Oops.. message (if applicable) with symbolic information "
echo "     resolved (see Documentation/oops-tracing.txt)"
echo "--"
echo 


echo "[6.] A small shell script or example program which triggers the"
echo "     problem (if possible)"
echo "--"
echo 

echo "[7.] Environment"
echo "[7.1.] Software (add the output of the ver_linux script here)"
$VER_LINUX
echo

echo "[7.2.] Processor information (from /proc/cpuinfo):"
cat /proc/cpuinfo
echo

echo "[7.3.] Module information (from /proc/modules):"
cat /proc/modules
echo

echo "[7.4.] Loaded driver and hardware information (/proc/ioports, /proc/iomem)"
cat /proc/ioports
echo
cat /proc/iomem
echo

echo "[7.5.] PCI information ('lspci -vvv' as root)"
$LSPCI
echo

echo "[7.6.] SCSI information (from /proc/scsi/scsi)"
cat /proc/scsi/scsi
echo

echo "[7.7.] Other information that might be relevant to the problem"
echo "       (please look in /proc and include all information that you"
echo "       think to be relevant):"
echo

echo "[X.] Other notes, patches, fixes, workarounds:"
echo



