#! /bin/sh

if [ -f /etc/pcmcia/shared ] ; then . /etc/pcmcia/shared ; fi

# Get device attributes
get_info $DEVICE
HWADDR=`/sbin/ifconfig $DEVICE | sed -n -e 's/.*addr \(.*\)/\1/p'`

# Set default settings
PROXIMCFG="sta domain 0"
if [ -f /etc/sq_proxcfg.conf ] ; then
	PROXIMCFG=`cat /etc/sq_proxcfg.conf`
fi

# Load site-specific settings
ADDRESS="$SCHEME,$SOCKET,$INSTANCE,$HWADDR"
if [ -f $0.opts ] ; then
	. $0.opts
fi

# Find the path where proxim tools are installed
for PRXPATH in /usr/bin /usr/sbin /bin /sbin; do
	if [ -x $PRXPATH/proxcfg ] ; then break ; fi
done

case "$ACTION" in

'start'|'resume')
	$PRXPATH/proxcfg $DEVICE $PROXIMCFG
	#./network $*
	;;

'stop'|'suspend')
	#./network $*
	;;

'check'|'cksum')
	#./network $*
	;;

'restart')
	#./network $*
	;;
*)
	#./network $*
	;;

esac

#exit 0
./network $*
exit $?

