home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #BK hardware probe 2003
- #Thanks to Antonio Gallo, badpenguin.org, for the libhardware.
-
- #note, "> out.txt 2>&1" is syntax required to redirect both stdout and
- #stderr to a file, using BusyBox Ash shell.
-
- echo "Press a button to probe the hardware of your PC." > /tmp/hardprobe.txt
- echo "Note: this is information only, nothing is changed." >> /tmp/hardprobe.txt
- echo "Query-PCI: Lists all interfaces on PCI bus" >> /tmp/hardprobe.txt
- echo "Drives: Finds all the drives" >> /tmp/hardprobe.txt
- echo "Partitions: Finds all the partitions and devices" >> /tmp/hardprobe.txt
- echo "Modules: Detect modules in database" >> /tmp/hardprobe.txt
- echo -n "HELP: Help on how to use this information" >> /tmp/hardprobe.txt
-
- while :; do
- xmessage -bg "#ffc0c0" -center -name "xutilities" -title "Puppy hardware probe" -buttons \
- "Query-PCI":10,"Drives":11,"Partitions":12,"Modules":13,"HELP":14,"EXIT":15 \
- -file /tmp/hardprobe.txt
-
- case ${?} in
- 10)# Query-PCI
- test-pci > /tmp/hardprobe.txt 2>&1
- ;;
- 11)# Drives
- probedisk > /tmp/hardprobe.txt 2>&1
- ;;
- 12)# Partitions
- probepart -k > /tmp/hardprobe.txt 2>&1
- ;;
- 13)# Modules
- scanmodule > /tmp/hardprobe.txt 2>&1
- ;;
- 14)# HELP
- dillo /usr/share/doc/HOWTO-modules.htm &
- ;;
- 15)# = exit
- break;;
- esac
- done
- rm -f /tmp/hardprobe.txt
-