1#!/bin/sh
2#
3# Script to initiate a ppp connection. This is the first part of the
4# pair of scripts. This is not a secure pair of scripts as the codes
5# are visible with the 'ps' command.  However, it is simple.
6#
7# These are the parameters. Change as needed.
8TELEPHONE=555-1212	# The telephone number for the connection
9ACCOUNT=george		# The account name for logon (as in 'George Burns')
10PASSWORD=gracie		# The password for this account (and 'Gracie Allen')
11LOCAL_IP=0.0.0.0	# Local IP address if known. Dynamic = 0.0.0.0
12REMOTE_IP=0.0.0.0	# Remote IP address if desired. Normally 0.0.0.0
13NETMASK=255.255.255.0	# The proper netmask if needed
14#
15# Export them so that they will be available at 'ppp-on-dialer' time.
16export TELEPHONE ACCOUNT PASSWORD
17# 
18# This is the location of the script which dials the phone and logs
19# in.  Please use the absolute file name as the $PATH variable is not
20# used on the connect option.  (To do so on a 'root' account would be
21# a security hole so don't ask.)
22#
23DIALER_SCRIPT=/etc/ppp/ppp-on-dialer
24#
25# Initiate the connection
26# 
27# I put most of the common options on this command. Please, don't
28# forget the 'lock' option or some programs such as mgetty will not
29# work. The asyncmap and escape will permit the PPP link to work with
30# a telnet or rlogin connection. You are welcome to make any changes
31# as desired. Don't use the 'defaultroute' option if you currently
32# have a default route to an ethernet gateway.
33#
34exec /usr/sbin/pppd debug lock modem crtscts /dev/ttyS0 38400 \
35	asyncmap 20A0000 escape FF kdebug 0 $LOCAL_IP:$REMOTE_IP \
36	noipdefault netmask $NETMASK defaultroute connect $DIALER_SCRIPT
37