#!/bin/sh

# Invoked by the device watcher when a PCMCIA ethernet card is added
#

VERBOSE=false

# Currently there is only one supported kind of pcmcia ethercard
#
if [ "$2x" != "/dev/net/etherpcmcia/0x" ]
then
	exit 0
fi

if [ "$1x" = "addedx" ]
then
	kill -9 net_server
	sleep 1
	/system/boot/Netscript &
	if [ $VERBOSE = "true" ]
	then
		alert "PCMCIA interface $2 online" &
	fi
	exit 0
fi

if [ "$1x" = "removedx" ]
then
	kill -9 net_server
	if [ $VERBOSE = "true" ]
	then
		alert "PCMCIA interface $2 online" &
	fi
	exit 0
fi
