Better method for grabbing disk name, dmesg may produce mangled output.

Approved by:	kib (mentor, implicit)
This commit is contained in:
jpaetzel 2011-02-22 19:18:56 +00:00
parent f2afad1aea
commit ab977d477a

View File

@ -74,7 +74,7 @@ do
fi
# Check the dmesg output for some more info about this device
NEWLINE=$(dmesg | sed -n "s/^$DEV: .*<\(.*\)>.*$/ <\1>/p" | head -n 1)
NEWLINE=$(camcontrol identify $DEV | grep "device model" | tr -s ' ' | sed 's |device model ||g')
if [ -z "$NEWLINE" ]; then
NEWLINE=" <Unknown Device>"
fi