Date: Tue, 3 Dec 1996 07:28:22 -0500 (EST) From: Keith Leonard <keithl@wakko.gil.net> To: questions@freebsd.org Subject: Shutdown of pppd Message-ID: <Pine.LNX.3.95.961203071833.28587A-100000@wakko.gil.net>
next in thread | raw e-mail | index | archive | help
Howdy, I seem to be having a little problem with shutting down my internet connection. On another UN*X (which will remain unnamed) I use the following scripts (with small config changes) to start-up and shutdown my connection to the net (I am using kernel ppp and not tun): #!/bin/sh ps ax | grep pppd | grep -v grep PID=`ps ax | grep pppd | grep -v grep | awk '{print $1}'` if [ "$PID" = "" ] then pppd connect 'chat -v "" ATDTXXXXXXX CONNECT ""\ Name: XXXXXX Password: XXXXXXXXXXX' \ /dev/cuaa0 38400 : fi Not very elegant but it works for getting on - now for getting off: #!/bin/sh pid=`ps ax | grep pppd | grep -v grep | awk '{print$1;}'` if [ X${pid} != "X" ] ; then echo 'killing pppd, PID=' ${pid} kill -9 ${pid} route flush fi the route flush seems to work (added for FreeBSD) - Now here is the problem: If I try to reconnect within a short time (less than 10 minutes) pppd (I think) goes through the usual and then informs me that the address already exist (I assume the ISP assign address - dynamic) and I can get nowhere (telnet, ftp, etc). What do I need to clean up the mess that this inelegant soulution has produced so that I can relogin without rebooting (I'm on a standalone machine). Any help would be appreciated Keith keithl@gil.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.95.961203071833.28587A-100000>