7. Scripts in /etc/ppp/ippp0.d

7.1. A few words on the concepts

According to suggestions of Marc Haber and others in the german ISDN4Linux-newsgroup [1] the design for starting and stopping scripts is done in a SYSV-initscript-style mixed with the run-parts concept of Debian depending on the device as well:

On dialup RedHat automatically invokes /etc/ppp/ip-up.local. This one will get some general information out of /etc/ppp/scripts/common. Then all scripts resp. the links to scripts in /etc/ppp/${DEVICE}.d/up/ will be executed.

On hangup /etc/ppp/ip-down.local [2] will be executed.

7.2. The scripts

7.2.1. /etc/ppp/scripts/get-dns

On dialup this one will change /etc/resolv.conf automatically for you, if you set GET_DNS to "yes" in /etc/sysconfig/network-scripts/ifcfg-ippp0.

7.2.2. /etc/ppp/scripts/onlinetime

On dialup this one will save a timestamp to /var/lock/${DEVICE}.online. On hangup it will see if the uptime is less than 10 seconds [3] and bring the device down. A message is then sent to root.

7.2.3. /etc/ppp/ippp0.d/routes

On dialup this one will change the route entries to be in accordance with your dynamic IP-addresses [4] . On hangup, it will reconfigure the isdn-device via ifconfig and reset the route-entries.

7.2.4. /etc/ppp/ippp0.d/private

Look into private for automatic triggering of EMail-download and send. As I use qmail, a replacement for sendmail, which is faster, more secure and easier to configure (wink), most users might want to take a look into the samples-directory of the documentation, where you will find a private.sendmail.

Note: For RPM-users: type rpm -qd rh-isdn to see where the documentation has gone, in the tgz it is located in the docs directory.

Notes

[1]

Where you might ask in english as well.

[2]

Which is in fact just a symlink to /etc/ppp/ip-up.local

[3]

Then there is in most cases sth. wrong with your connection

[4]

Only if DYNAMIC-IP is set to yes in Section 4.2.