Chapter 18. Automating your connections - Creating the connection scripts

Table of Contents
18.1. Connection scripts for User name/Password Authentication
18.2. The ppp-on script
18.3. Editing the supplied PPP startup scripts
18.3.1. The ppp-on script
18.3.2. The ppp-on-dialer script
18.4. What a Chat script means...
18.5. A chat script for PAP/CHAP authenticated connections
18.6. The pppd debug and file option_file options

Whilst you can continue to log in by hand as shown above, it is much neater to set up some scripts to do this automatically for you.

A set of scripts automates the log in and PPP start up so all you have to do (as root or as a member of the PPP group) is issue a single command to fire up your connection.

18.1. Connection scripts for User name/Password Authentication

If your ISP does NOT require the use of PAP/CHAP, these are the scripts for you!

If the ppp package installed correctly, you should have two example files. For PPP 2.1.2 they are in /usr/sbin and for PPP 2.2 they are in /etc/ppp/scripts. They are called

for PPP-2.1.2

ppp-on
ppp-off

and for PPP-2.2

ppp-off
ppp-on
ppp-on-dialer

Now, if you are using PPP 2.1.2, I strongly urge you to delete the sample files. There are potential problems with these - and don't tell me they work fine - I used them for ages too (and recommended them in the first version of this HOWTO)!

For the benefit of PPP 2.1.2 users, here are BETTER template versions, taken from the PPP 2.2 distribution. I suggest you copy and use these scripts instead of the old PPP-2.1.2 scripts.

mirror server hosted at Truenetwork, Russian Federation.