PPP Daemon "ip-preup" script patch
v1.0 - Toby Reed <toby@eskimo.com>
----------------------------------

DESCRIPTION

This patch to pppd adds a new feature called "ip-preup". You know what the
ip-up and ip-down files do. But what about running commands right before
the routing is set up? My purpose for wanting to do this was the dummy
device. As a wanna-be gateway for my lan, there were a lot of IP address
dependancies, but since I don't have a 24/7 connection for my lan, if I
was not connected, nobody could read their mail or news. Eventually I set
up a dummy address to my static IP. Now it worked great, but with one
problem. I was running the script to remove the dummy device in the
command to call my isp, and the command to create the dummy device in my
ip-down file. There was a short section of time between running the call
command and when the link actually came up that the network couldn't read
news or mail. Especially if it spends 15/20 minutes redialling. So I added
/etc/ppp/ip-preup, which is run right before the route is established.
Now instead of in the call command, the script to remove the dummy device
is run in /etc/ppp/ip-preup. This also means if I kill the pppd process
when it is dialing, I do not have to manually restart the dummy device.
Cool, huh?

USAGE

- Untar pppd-2.2.0f in /usr/src:
cd /usr/src
tar zxvf /path/to/pppd-2.2.0f.tar.gz

- Change to pppd-2.2.0f/pppd:
cd pppd-2.2.0f/pppd

- Apply the patch:
patch -p0 < /path/to/ppp-preup-patch

If no errors or .rej files are generated, the patching was a success. You
can delete *.orig. Now configure, compile and install PPPD as usual
(described in the READMEs).

BLAH

I decided to distribute this patch for people who are source-code-phobics,
like I was a few years ago, and have the same or simular problems as me.
Hope this helps somebody.

Good luck!

-Toby
 toby@eskimo.com
