head     1.2;
branch   ;
access   ;
symbols  ;
locks    ; strict;
comment  @# @;


1.2
date     93.01.28.15.26.36;  author ks;  state Exp;
branches ;
next     1.1;

1.1
date     93.01.19.14.50.39;  author ks;  state Exp;
branches ;
next     ;


desc
@@


1.2
log
@New pathname stuff.. 
@
text
@#!/bin/sh
#
# Stop the daemon, mark interfaces down, kill routes and then unload
# the modules

DEVICE=/dev/dp0
. /etc/dp.conf

#
# Kill the daemon
#
kill -TERM `cat $DPPID_DIR/dpd`

#
# ifconfig 'down' interfaces
#
if [ -f $DPCONF_DIR/dp-if ]; then
	cat $DPCONF_DIR/dp-if | (
		while read IFNAME LOCAL REMOTE
		do
			ifconfig $IFNAME down
		done
	)
fi

#
# kill routes from netstat output
#

netstat -n -r | (
	read line1
	read line2
	while read DEST GATE FLAGS REFCNT USE INTERFACE
	do
		if [ "`echo $INTERFACE | cut -c1,2`"X = "dp"X ]; then
			route delete $DEST $GATE
		fi
	done
	)

#
# let it quiet down a bit ...
#
sleep 2

# OK - exit true
exit 0
@


1.1
log
@Initial revision
@
text
@d7 1
a7 3
DPDIR=/etc/dp
BINDIR=/usr/etc
LOGDIR=/var/adm/dp
d12 1
a12 1
kill -TERM `cat $LOGDIR/PID.dpd`
d17 2
a18 2
if [ -f $DPDIR/config/dp-if ]; then
	cat $DPDIR/config/dp-if | (
@
