From owner-freebsd-stable Fri Mar 8 14:22:14 2002 Delivered-To: freebsd-stable@freebsd.org Received: from dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NetScum.dyndns.dk (pop-mu-9-2-dialup-111.freesurf.ch [194.230.146.111]) by hub.freebsd.org (Postfix) with ESMTP id C5DE137B402 for ; Fri, 8 Mar 2002 14:21:39 -0800 (PST) Received: from beerswilling.netscum.dyndns.dk (dcf77-zeit.netscum.dyndns.dk [172.27.72.27] (may be forged)) by dastardly.newsbastards.org.72.27.172.IN-addr.ARPA.NetScum.dyndns.dk (8.11.6/8.11.6) with ESMTP id g28MHOT12726 (using TLSv1/SSLv3 with cipher EDH-RSA-DES-CBC3-SHA (168 bits) verified FAIL) for ; Fri, 8 Mar 2002 23:17:26 +0100 (CET) (envelope-from bounce@netscum.dyndns.dk) Received: (from root@localhost) by beerswilling.netscum.dyndns.dk (8.11.6/8.11.6) id g28MHNa12725; Fri, 8 Mar 2002 23:17:23 +0100 (CET) (envelope-from bounce@netscum.dyndns.dk) Date: Fri, 8 Mar 2002 23:17:23 +0100 (CET) Message-Id: <200203082217.g28MHNa12725@beerswilling.netscum.dyndns.dk> From: BOUWSMA Beery To: freebsd-stable@freebsd.org Subject: Userland ppp ppp.linkdown and pre-going-offline commands... Organization: Men not wearing any pants that dont shave X-Hacked: via telnet to your port 25, what else? X-Internet-Access-Provided-By: Slow Dial-in Modem X-NetScum: Yes X-One-And-Only-Real-True-Fluffy: No Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [replies sent directly to me may timeout and bounce, since I'm not online as often as I should be, but I'll check the list archives] (not really about stable per se, but I don't know if it's appropriate material for -hackers or where) The userland ppp /etc/ppp/ppp.linkdown script allows one to do things when going offline, just as the linkup script can be used to notify the world that one is online. However, whether by design or otherwise, the commands in the script as it exists get executed normally *after* IP connectivity to the world has been lost, but while the physical modem connection remains. This is fine for things that need to be done locally, and it also means these things are done when, say, carrier is unexpectedly lost. However, this rather fails in cases where I want to notify, say, a DNS service that I'm going offline. The link is down, I try to send an IP packet, it goes nowhere, but I'm still off-hook and the phone line charges pile up until I kill the process waiting for a response. What I'm looking for is something that gets executed when the link is still up, at the time a graceful `close' or similar command is given, and then after it completes, the link is brought down and the present linkdown script is run. I see in the ipcp.c IpcpLayerDown() k0deZ that this might be planned: * XXX this stuff should really live in the FSM. Our config should * associate executable sections in files with events. just before the linkdown script is processed. Does anyone else see a need for a pre-IpcpLayerDown script that can be used to run pre-logout commands that require connectivity (such as updating DNS and mail machines and the like)? I'm thinking of just hack-adding a second script to be run earlier, but it looks as if there may be a preferred way this should be done... thanks barry bouwsma To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message