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