#!/bin/sh
# This script receives the arguments passed to /etc/ppp/ip-down by pppd
# $6 is (not all the time "pppdialin")
# $7 is the user id
# $6 and $7 are passed by the pppd ipparam parameter when
# called by ppplogin
PPPPARMS=/usr/lib/linuxconf/lib/pppparms
USER=$7
if [ "$6" = "pppdialin" ] ; then
	# check out for a postdisconnect command
	eval `$PPPPARMS pppdopt $USER defppp`
	if [ "$PPP_POSTDISCONCMD" != "" ] ; then
		eval $PPP_POSTDISCONCMD
	fi
	rm -f /var/run/pppdialin.$USER
	if [ "$PPP_FIREWALL" = "yes" ] ; then
		/bin/linuxconf --modulemain firewall --update
	fi
fi

