Date: Fri, 8 Mar 2002 23:17:23 +0100 (CET) From: BOUWSMA Beery <freebsd-user@dcf77-zeit.netscum.dyndns.dk> To: freebsd-stable@freebsd.org Subject: Userland ppp ppp.linkdown and pre-going-offline commands... Message-ID: <200203082217.g28MHNa12725@beerswilling.netscum.dyndns.dk>
next in thread | raw e-mail | index | archive | help
[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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203082217.g28MHNa12725>