#!/bin/sh
#
# fixed 1.17 1997/05/13 02:16:47 (David Hinds)
#
# Initialize or shutdown a PCMCIA ISDN adapter
#
# The first argument should be either 'start' or 'stop'.  The second
# argument is the base name for the device.
#
# The script passes an extended device address to 'fixed.opts' in the
# ADDRESS variable, to retrieve device-specific configuration options.
# The address format is "scheme,socket,dev,controller" where
# "scheme" is the PCMCIA configuration scheme, "socket" is the socket
# number, "dev" ist last part of version info  and "controller" i
# the controller number.
#
# The script first calls isdn.opts for the entire device.  
#

. ./shared

# Get device attributes
get_info $DEVICE

# Load site-specific settings
ADDRESS="$SCHEME,$SOCKET,$DEVICE,$MINOR"
CONTROLLER=$MINOR
CARDTYPE=$DEVICE

. $0.opts


case "$ACTION" in

'start')
    if [ "$NEEDFIRMWARE" = "yes" ] ; then
	if [ -z $DPROTOCOL ] ; then
	   PATCHES=""
	fi
        avmcapictrl load /usr/lib/isdn/$T4FILE $CONTROLLER $DPROTOCOL $PATCHES
    fi
    ;;

'check')
    ;;

'stop')
    ;;

'suspend'|'resume')
    ;;

*)
    usage
    ;;

esac

exit 0
