diff options
Diffstat (limited to 'usr.sbin/pc-sysinstall')
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend-query/disk-list.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/pc-sysinstall/backend-query/disk-list.sh b/usr.sbin/pc-sysinstall/backend-query/disk-list.sh index 964d4cc..8baa8d2 100755 --- a/usr.sbin/pc-sysinstall/backend-query/disk-list.sh +++ b/usr.sbin/pc-sysinstall/backend-query/disk-list.sh @@ -73,10 +73,15 @@ do esac fi - # Check the dmesg output for some more info about this device - NEWLINE=$(camcontrol identify $DEV | grep "device model" | tr -s ' ' | sed 's |device model ||g') + # Try and find some identification information with camcontrol or atacontrol + NEWLINE=$(camcontrol identify $DEV | sed -ne 's/^device model *//p') if [ -z "$NEWLINE" ]; then - NEWLINE=" <Unknown Device>" + # Now try atacontrol + NEWLINE=$(atacontrol list | sed -n "s|^.*$DEV <\(.*\)>.*|\1|p") + + if [ -z "$NEWLINE" ]; then + NEWLINE=" <Unknown Device>" + fi fi if [ -n "${FLAGS_MD}" ] && echo "${DEV}" | grep -E '^md[0-9]+' >/dev/null 2>/dev/null |