home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 16 / hacker16 / 16_HACKER16.ISO / linux / tpm-security-server-1.2.1.iso / archive / etc / rc.d / init.d / probeusb < prev    next >
Encoding:
Text File  |  2004-01-29  |  614 b   |  55 lines

  1. #!/bin/sh
  2.  
  3. . /etc/init.d/functions
  4.  
  5. workonlast() {
  6.     echo 
  7.     echo "Detected..."
  8.     echo "Product: $PROD"
  9.     echo "Bus: $BUS"
  10.     echo "Manufacturer: $MAN"
  11.     echo "Vendor: $VEND"
  12.     echo "Serial Number: $SER"
  13. }
  14.  
  15. PROD=""
  16. BUS=""
  17. MAN=""
  18. VEND=""
  19. SER=""
  20.  
  21. read -u 9 A
  22. while [ "x$A" != "x" ]; do 
  23.     case "$A" in
  24.         T:*)
  25.             if [ "x$BUS" != "x" ]; then
  26.                 workonlast
  27.             fi
  28.             PROD=""
  29.             BUS="$A"
  30.             MAN=""
  31.             VEND=""
  32.             SER=""
  33.                     ;;
  34.         P:*)
  35.             VEND="$A"
  36.             ;;
  37.         S:*Product=*)
  38.             PROD="$A"
  39.             ;;
  40.         S:*SerialNumber=*)
  41.             SER="$A"
  42.             ;;
  43.         S:*Manufacturer=*)
  44.             MAN="$A"
  45.             ;;
  46.         *)
  47.             ;;
  48.     esac
  49.     
  50.  
  51.     read -u 9 A
  52. done 
  53. workonlast
  54.  
  55.