6 modprobe -r ppp_deflate
10 modprobe -r ppp_generic
13 if [ -r /var/run/$DEVICE.pid ]; then
14 kill -INT `cat /var/run/$DEVICE.pid`
18 if ps x | fgrep "options.demand" 1> /dev/null 2> /dev/null ; then
19 D="echo Demand Dialing Stoped."
22 if [ -r /var/run/$DEVICE.pid ]; then
23 kill -INT `cat /var/run/$DEVICE.pid`
25 if [ ! "$?" = "0" ]; then
26 killall -INT pppd 2>/dev/null
27 rm -f /var/run/$DEVICE.pid
29 echo "ERROR: No pppd process running, removed stale pid file."
34 echo "PPP link to [$DEVICE] terminated."
36 if [ "$1" = "-d" ]; then
37 pppd file "/etc/ppp/options.demand" || exit 1
38 echo "Demand Dialing Started."
40 elif [ "$2" = "-d" ]; then
41 pppd file "/etc/ppp/options.demand" || exit 1
42 echo "Demand Dialing Started."
48 echo "ERROR: PPP link is not active on: [$DEVICE]"