19e1d50b6SBrian Somers######################################################################### 29e1d50b6SBrian Somers# 39e1d50b6SBrian Somers# Example of ppp.linkup file 49e1d50b6SBrian Somers# 59e1d50b6SBrian Somers# This file is checked when ppp establishes a connection. 69e1d50b6SBrian Somers# ppp searches the labels in this file as follows: 79e1d50b6SBrian Somers# 89e1d50b6SBrian Somers# 1) The label that matches the IP number assigned to our side. 99e1d50b6SBrian Somers# 109e1d50b6SBrian Somers# 2) The label specified on the command line to ppp. 119e1d50b6SBrian Somers# 129e1d50b6SBrian Somers# 3) If no label has been found, use MYADDR if it exists. 139e1d50b6SBrian Somers# 149e1d50b6SBrian Somers# 159e1d50b6SBrian Somers# 169e1d50b6SBrian Somers######################################################################### 179e1d50b6SBrian Somers 189e1d50b6SBrian Somers# It is no longer necessary to re-add the default route here as our 199e1d50b6SBrian Somers# ppp.conf route is `sticky' (see the man page). 209e1d50b6SBrian Somers# If you're into sound effects when the link comes up, you can run 219e1d50b6SBrian Somers# ``auplay'' (assuming NAS is installed and configured). 229e1d50b6SBrian Somers# 239e1d50b6SBrian SomersMYADDR: 249e1d50b6SBrian Somers !bg /usr/X11R6/bin/auplay /etc/ppp/linkup.au 259e1d50b6SBrian Somers 269e1d50b6SBrian Somers# If we've got 192.244.176.32 as our address, then regard peer as a gateway 279e1d50b6SBrian Somers# to 192.244.176.0 network. This may also be done in ppp.conf instead. 289e1d50b6SBrian Somers# 299e1d50b6SBrian Somers192.244.176.32: 309e1d50b6SBrian Somers add 192.244.176.0 0 HISADDR 319e1d50b6SBrian Somers 329e1d50b6SBrian Somers# You may want to execute a script after connecting. This script can do 339e1d50b6SBrian Somers# nice things such as kick off "sendmail -q", "popclient my.isp" and 349e1d50b6SBrian Somers# "slurp -d news". It can be passed MYADDR, HISADDR and INTERFACE 359e1d50b6SBrian Somers# as arguments too - useful for informing a DNS of your assigned IP. 36a063878aSBrian Somers# 37a063878aSBrian Somers# NOTE: It's vital that you use ``!bg'' rather than ``!'' if the program 38a063878aSBrian Somers# you're running will take some time or will require network 39a063878aSBrian Somers# connectivity. Using ``!'' will delay ppp 'till the completion 40a063878aSBrian Somers# of the program being run! 419e1d50b6SBrian Somers# 429e1d50b6SBrian Somers# You may also want some sound effects.... 439e1d50b6SBrian Somers# 449e1d50b6SBrian Somerspmdemand: 459e1d50b6SBrian Somers !bg /etc/ppp/ppp.etherup.pmdemand 469e1d50b6SBrian Somers ! sh -c "cat /etc/ppp/linkup.au >/dev/audio" 479e1d50b6SBrian Somers 489e1d50b6SBrian Somers# If your minimum call charge is 5 minutes, you may as well stay on 499e1d50b6SBrian Somers# the line for that amount of time. If we want a 60 second subsequent 509e1d50b6SBrian Somers# timeout, set your timeout to 300 in ppp.conf and then do this: 519e1d50b6SBrian Somers# 529e1d50b6SBrian Somersmin5minutes: 539e1d50b6SBrian Somers !bg sh -c "sleep 240; pppctl -p mypassword 3000 set timeout 60" 54