#!/bin/sh -
#
# pccardetherstop interfacename
#
# example: pccardetherstop nep0
#
# Mar 9, 1996 by Hajimu UMEMOTO <ume@calm.imasy.or.jp>

pccarddir=/var/tmp/.pccard

if [ -f $pccarddir/pccard_ether_$1 ] ; then
	ifconfig_args=`cat $pccarddir/pccard_ether_$1`
	if [ "x$ifconfig_args" = "xDHCP" ] ; then
		kill `ps x | awk '$5 ~/(^|\/)dhcpc$/ && $6 ~/^'$1'$/ {print $1}'`
	else
		ifconfig $1 delete
	fi
fi
