#! /bin/sh
#
# Based on network 1.85 2002/05/12 18:07:31 (David Hinds)
#
# Initialize or shutdown a PCMCIA ethernet adapter
#
# This script should be invoked with two arguments.  The first is the
# action to be taken, either "start", "stop", or "restart".  The
# second is the network interface name.
#
# The script passes an extended device address to 'network.opts' in
# the ADDRESS variable, to retrieve device-specific configuration
# options.  The address format is "scheme,socket,instance,hwaddr"
# where "scheme" is the current PCMCIA device configuration scheme,
# "socket" is the socket number, "instance" is used to number multiple
# interfaces in a single socket, and "hwaddr" is the card's hardware
# ethernet address.
#

if [ -r ./shared ] ; then . ./shared ; else . /etc/pcmcia/shared ; fi
. ./$0.opts

# Now, run the specific script for Wireless LAN interfaces
# Note : we need the wireless parameters to be set up before IP parameters,
# so that we can perform DHCP over the Wireless link if needed. Jean II
O_INFO=$INFO ; INFO=
if [ -x ./wireless ] ; then
    . ./wireless
else
    . /etc/pcmcia/wireless
fi
INFO=$O_INFO

case "$ACTION" in

'start')
    log /sbin/ifup $DEVICE
    ;;

'stop')
    log /sbin/ifdown $DEVICE
    ;;

'check')
    ;;

'cksum')
    ;;

'restart')
    log /sbin/ifdown $DEVICE
    log /sbin/ifup $DEVICE
    ;;
 
'suspend'|'resume')
    ;;

*)
    usage
    ;;

esac

exit 0
