Installing and Administering PPP

Chapter 4 69
Common pppd Options
The exec Option
Example
This example uses a Login shell script to invoke an executable shell
script called $PPPHOME/Exec. $PPPHOME/Exec causes sendmail to run
its queue whenever a remote system establishes a connection, possibly
triggering a delivery to the remote system.
Login Shell Script
#!/bin/sh
PATH=/usr/bin:/usr/etc:/etc:/bin
PPPHOME=/etc/ppp
export PPPHOME PATH
mesg n
stty -tostop
exec pppd ‘hostname‘: idle 130 exec $PPPHOME/Exec
Executable Shell Script:
#!/bin/sh
case "$1" in
up) echo link is up at ‘date‘ > /dev/console ;
/usr/lib/sendmail -q < /dev/null ;;
down) echo link is down at ‘date‘ > /dev/console ;;
esac
PPP_ORIG_NETMASK Original netmask.
PPP_INTERFACE Name of PPP interface (DUX).
PPP_DEVICE Name of device being used for serial stream.
PPP_LOGFILE Self-explanatory.
PPP_ACCTFILE Self-explanatory.
PPP_AUTHNAME Peer name if CHAP/PAP is used, else “name”
parameter from command line, if given. Else
user name of user that started pppd.
PPP_PID pppd user process PID.
PPP_SHUTDOWN Shutdown reason if link is going down and a
shutdown reason is available, else non-existent.
Variable Description