#!/bin/sh 
#script systeminfo, written by newbiefan for oleg firmware
#
#choose path & filename to any writeable location
if [ -z $1 ] ; then
  store_to=/tmp/mnt/disc0_3/systeminfo.txt
 else
  store_to=$1
fi
clear
echo "=====================================Script $(basename $0)==========================================" > $store_to
echo "Script Systeminfo dated: " `date` >> $store_to
echo "called from directory" `pwd` as user `whoami` >> $store_to
echo >> $store_to
echo "======== cpuinfo ========" >> $store_to 
cat /proc/cpuinfo >> $store_to 
echo >> $store_to
echo "======== version & kernel ========" >> $store_to 
#cat /proc/version >> $store_to 
uname -a >> $store_to
echo >> $store_to
echo "======== meminfo ========" >> $store_to 
cat /proc/meminfo >> $store_to 
echo >> $store_to
echo "======== RS232 ========" >> $store_to
cat /proc/tty/driver/serial >> $store_to
echo >> $store_to
echo "======== character & block devices ========" >> $store_to
cat /proc/devices >> $store_to
echo >> $store_to
echo "======== filesystems ========" >> $store_to
cat /proc/filesystems >> $store_to
echo  >> $store_to
echo "======== used interrupts ========" >> $store_to
cat /proc/interrupts  >> $store_to
echo  >> $store_to
echo "======== mtd's ========" >> $store_to
cat /proc/mtd  >> $store_to
echo >> $store_to
echo "======== partitions ========" >> $store_to
cat /proc/partitions >> $store_to
echo >> $store_to
echo "========= attached hdd/stick device ========" >> $store_to
cat /proc/scsi/scsi >> $store_to
echo >> $store_to
echo "========= storage housing ========" >> $store_to
cat /proc/scsi/usb-storage-0/0 >> $store_to
echo >> $store_to
echo "======== usb devices ========" >> $store_to
cat /proc/bus/usb/devices >> $store_to
echo >> $store_to
echo "======== usb drivers ========" >> $store_to
cat /proc/bus/usb/drivers >> $store_to
echo >> $store_to
echo "======== swaps ========" >> $store_to 
cat /proc/swaps >> $store_to 
echo >> $store_to
echo "======== mount ========" >> $store_to 
mount >> $store_to 
echo >> $store_to
echo "======== df =========" >> $store_to 
df >> $store_to 
echo >> $store_to
echo "======== ifconfig ========" >> $store_to 
ifconfig >> $store_to 
echo >> $store_to
echo "======== route ========" >> $store_to 
route >> $store_to 
echo >> $store_to 
echo "======== libs ========" >> $store_to 
ls -lR /lib/ /lib/libc.* /lib/ld* /lib/libpthread.* /usr/lib /opt/lib >> $store_to 
echo >> $store_to
echo "======== etc ========" >> $store_to 
ls -lR /etc >> $store_to 
echo >> $store_to
echo "======== /opt/etc ========" >> $store_to 
ls -lR /opt/etc >> $store_to
echo >> $store_to
echo "======== nvram ========" >> $store_to
nvram show >> $store_to
echo >> $store_to
echo "======== installed packages ========" >> $store_to
ipkg list_installed >> $store_to
echo >> $store_to
