ppp.linkup.sample revision 50476
1145132Sanholt######################################################################### 2145132Sanholt# 3145132Sanholt# Example of ppp.linkup file 4145132Sanholt# 5145132Sanholt# This file is checked when ppp establishes a connection. 6145132Sanholt# ppp searches the labels in this file as follows: 7145132Sanholt# 8145132Sanholt# 1) The label that matches the IP number assigned to our side. 9145132Sanholt# 10145132Sanholt# 2) The label specified on the command line to ppp. 11145132Sanholt# 12145132Sanholt# 3) If no label has been found, use MYADDR if it exists. 13145132Sanholt# 14145132Sanholt# 15145132Sanholt# $FreeBSD: head/share/examples/ppp/ppp.linkup.sample 50476 1999-08-28 00:22:10Z peter $ 16145132Sanholt# 17145132Sanholt######################################################################### 18145132Sanholt 19145132Sanholt# It is no longer necessary to re-add the default route here as our 20145132Sanholt# ppp.conf route is `sticky' (see the man page). 21145132Sanholt# If you're into sound effects when the link comes up, you can run 22145132Sanholt# ``auplay'' (assuming NAS is installed and configured). 23145132Sanholt# 24145132SanholtMYADDR: 25145132Sanholt !bg /usr/X11R6/bin/auplay /etc/ppp/linkup.au 26145132Sanholt 27145132Sanholt# If we've got 192.244.176.32 as our address, then regard peer as a gateway 28145132Sanholt# to 192.244.176.0 network. This may also be done in ppp.conf instead. 29145132Sanholt# 30145132Sanholt192.244.176.32: 31145132Sanholt add 192.244.176.0 0 HISADDR 32152909Sanholt 33152909Sanholt#You may want to execute a script after connecting. This script can do 34152909Sanholt# nice things such as kick off "sendmail -q", "popclient my.isp" and 35145132Sanholt# "slurp -d news". It can be passed MYADDR, HISADDR and INTERFACE 36145132Sanholt# as arguments too - useful for informing a DNS of your assigned IP. 37145132Sanholt# 38145132Sanholt# You may also want some sound effects.... 39145132Sanholt# 40145132Sanholtpmdemand: 41145132Sanholt !bg /etc/ppp/ppp.etherup.pmdemand 42145132Sanholt ! sh -c "cat /etc/ppp/linkup.au >/dev/audio" 43145132Sanholt 44145132Sanholt# If your minimum call charge is 5 minutes, you may as well stay on 45145132Sanholt# the line for that amount of time. If we want a 60 second subsequent 46145132Sanholt# timeout, set your timeout to 300 in ppp.conf and then do this: 47145132Sanholt# 48145132Sanholtmin5minutes: 49145132Sanholt !bg sh -c "sleep 240; pppctl -p mypassword 3000 set timeout 60" 50145132Sanholt