#ident "@(#)wd0 1.8-91/08/29"
#help#  Selecting this menu item will configure the
#help#  D-Link DE-220 Ethernet Card into the system
#menu#  D-Link DE-220 Ethernet Card

changed=no
PATH=:/bin:/usr/bin:/usr/lbin
CONFDIR=/etc/conf
CNFMODS=${CONFDIR}/pack.d
SDEVICEDIR=${CONFDIR}/sdevice.d
SDEVICE=${CONFDIR}/cf.d/sdevice
FULLNAME="D-Link DE-220"
NAME=D-Link
DNAME=d22e0
TEMPSDEV=/tmp/sdev.$DNAME.$$
LOCNAME=`uname -n`
FUNCSDIR=/usr/admin/menu/packagemgmt/netdrvrmgmt/configure

. ${FUNCSDIR}/funcs

bad_sdevdir ${DNAME} && exit 1

if grep "^$DNAME" /etc/cnfgdrv > /dev/null 2>&1
then
        do_mult d22e0 "D-Link DE-220 Board" "d22e0, d22e1, d22e2, d22e3" "d22e0 d22e1 d22e2 d22e3"
fi


bad_sdevdir ${DNAME} && exit 1
set_env


do_hdr
echo "  Interrupt Request Line (IRQ)............. ${irqvec}"
echo "  Start I/O Address on I/O bus............. 0x${stioa}"
echo "  End I/O Address on I/O bus............... 0x${endioa}"
echo ""

#
#  Offer the user a chance to change the interrupt vector line
#
q="Do you want to use the current IRQ value"
h="Answer 'n' if you want to change the IRQ value"
oktochange Yes "${q}" "${h}" && \
        do_changeirq "3 4 5 9 10 11 15"

q="Do you want to use the current I/O Port address range"
h="Answer 'n' if you want to change the I/O Port address range"
oktochange Yes "${q}" "${h}" && \
   do_changeio "[23][a-fA-F0-9][a-fA-F0-9]" "[23][a-fA-F0-9][a-fA-F0-9]"


#
# check for conflicts in the interrupt vector
#
chk_intvec

saveit "*D-Link DE-220 Ethernet Driver"

askbuild

/bin/rm -f ${TEMPSDEV} $T1
exit 0
