test-eide 521 B

12345678910111213141516171819
  1. #!/bin/sh
  2. #LGPL 2007 www.puppylinux.com
  3. #replaces test-eide in Antonio Gallo's libhardware package.
  4. #BarryK 19 June 2007
  5. #hd* disk devices, mask off partitions...
  6. #ALLDRVS="`grep ' hd' /proc/diskstats | tr -s ' ' | cut -f 4 -d ' ' | grep -v 'hd.*[0-9]$' | tr '\n' ' '`"
  7. #no, has to be done this way...
  8. ALLDRVS="`ls -1 /proc/ide | grep '^hd[a-z]' | tr '\n' ' '`"
  9. for ONEDRV in $ALLDRVS
  10. do
  11. MEDIA="`cat /proc/ide/$ONEDRV/media`"
  12. INFO="`cat /proc/ide/$ONEDRV/model`"
  13. echo "/dev/$ONEDRV - $MEDIA - $INFO"
  14. done
  15. ###END###