home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- . /etc/init.d/functions
-
- workonlast() {
- echo
- echo "Detected..."
- echo "Product: $PROD"
- echo "Bus: $BUS"
- echo "Manufacturer: $MAN"
- echo "Vendor: $VEND"
- echo "Serial Number: $SER"
- }
-
- PROD=""
- BUS=""
- MAN=""
- VEND=""
- SER=""
-
- read -u 9 A
- while [ "x$A" != "x" ]; do
- case "$A" in
- T:*)
- if [ "x$BUS" != "x" ]; then
- workonlast
- fi
- PROD=""
- BUS="$A"
- MAN=""
- VEND=""
- SER=""
- ;;
- P:*)
- VEND="$A"
- ;;
- S:*Product=*)
- PROD="$A"
- ;;
- S:*SerialNumber=*)
- SER="$A"
- ;;
- S:*Manufacturer=*)
- MAN="$A"
- ;;
- *)
- ;;
- esac
-
-
- read -u 9 A
- done
- workonlast
-
-