#!/bin/sh
#
# ident "@(#)isdnprobe 1.1 93/02/23 Copyr 1992 Sun Micro"
#
# probe system for ISDN cards of various types
#
# must be called from SunLink ISDN install scripts
#
#

OS=`uname -r`
case $OS in

	5.*) PROBE=/usr/sbin/prtconf
	     ;;

	4.*) PROBE=/usr/etc/devinfo
	     ;;

	*)   echo "$0: cannot determine operating system release $OS"
	     exit 1
esac

# try to find DBRI cards
NDBRI=`$PROBE | grep 'SUNW,DBRI.' | wc -l`

# remove any whitespace from wc
NDBRI=`expr $NDBRI`

NCARDS=$NDBRI

# By default make two point-to-point and one multipoint interface
# for each card.
NISDNPTP=`expr $NCARDS \* 2`
NISDNMTP=$NCARDS


