#!/bin/sh
#
# Copyright (C) 1995,1996  Lars Berntzon
#
case "`uname -r`" in
5.*)
    sysdef -d |
	grep -v "(no driver)" |
	sed -e "s/[^']*'//" -e "s/',.*unit *#//" |
	once;;
*)
    case "`uname -m`" in
    aushp)
	#
	# AUSPEX special.
	#
	
	#
	# Check disks, rows with the format:
	#    .... vmunix: ad5: <Auspex 4GB cyl 4094 alt 1 hd 16 sec 128>
	#
	(dmesg; cat /var/adm/messages*) |
	    sed -e '/.*unix: .d[0-9]*: *</!d' -e 's/.*unix: //' -e 's/:.*//' |
	    once

	#
	# Other devices.
	#
	(dmesg; cat /var/adm/messages*; dmesg) |
	    sed -e 's/.*unix:[ 	]/unix: /' \
		-e '/^unix: [- \	,a-zA-Z_0-9]* at /!d' \
		-e 's/ at .*//' -e 's/unix: //' | once
	;;

    *)
    	(dmesg; cat /var/adm/messages*) |
	sed 's/.*unix: /unix: /' |
	$AWK '$0~/^unix: [,a-zA-Z_0-9]* at/ {print $2}' | once
	;;
    esac
esac
