From owner-freebsd-questions Tue Dec 3 04:27:59 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA08357 for questions-outgoing; Tue, 3 Dec 1996 04:27:59 -0800 (PST) Received: from wakko.gil.net (keithl@wakko.gil.net [207.100.79.10]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id EAA08328 for ; Tue, 3 Dec 1996 04:27:56 -0800 (PST) Received: from localhost (keithl@localhost) by wakko.gil.net (8.8.3/8.8.2) with SMTP id HAA28687 for ; Tue, 3 Dec 1996 07:28:22 -0500 Date: Tue, 3 Dec 1996 07:28:22 -0500 (EST) From: Keith Leonard To: questions@freebsd.org Subject: Shutdown of pppd Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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