summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pc-sysinstall
diff options
context:
space:
mode:
authorjpaetzel <jpaetzel@FreeBSD.org>2011-02-23 17:52:26 +0000
committerjpaetzel <jpaetzel@FreeBSD.org>2011-02-23 17:52:26 +0000
commit6afaafbd899275c6610f56a275e2dd2c587c3a95 (patch)
tree765a86cc1b125eed3616baf12e9c1486c8a14270 /usr.sbin/pc-sysinstall
parent94fe6c80c71b0f8789aa55d2fd321d78e264b0f3 (diff)
downloadFreeBSD-src-6afaafbd899275c6610f56a275e2dd2c587c3a95.zip
FreeBSD-src-6afaafbd899275c6610f56a275e2dd2c587c3a95.tar.gz
Alter comment to reflect change in code.
Try atacontrol if camcontrol fails. Approved by: kib (mentor, implicit)
Diffstat (limited to 'usr.sbin/pc-sysinstall')
-rwxr-xr-xusr.sbin/pc-sysinstall/backend-query/disk-list.sh11
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
OpenPOWER on IntegriCloud