xref: /freebsd/share/examples/ppp/ppp.linkup.sample (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1#########################################################################
2#
3#          Example of ppp.linkup file
4#
5#  This file is checked when ppp establishes a connection.
6#  ppp searches the labels in this file as follows:
7#
8#  1) The label that matches the IP number assigned to our side.
9#
10#  2) The label specified on the command line to ppp.
11#
12#  3) If no label has been found, use MYADDR if it exists.
13#
14#
15#
16#########################################################################
17
18# It is no longer necessary to re-add the default route here as our
19# ppp.conf route is `sticky' (see the man page).
20# If you're into sound effects when the link comes up, you can run
21# ``auplay'' (assuming NAS is installed and configured).
22#
23MYADDR:
24 !bg /usr/X11R6/bin/auplay /etc/ppp/linkup.au
25
26# If we've got 192.244.176.32 as our address, then regard peer as a gateway
27# to 192.244.176.0 network.  This may also be done in ppp.conf instead.
28#
29192.244.176.32:
30 add 192.244.176.0 0 HISADDR
31
32# You may want to execute a script after connecting.  This script can do
33# nice things such as kick off "sendmail -q", "popclient my.isp" and
34# "slurp -d news".  It can be passed MYADDR, HISADDR and INTERFACE
35# as arguments too - useful for informing a DNS of your assigned IP.
36#
37# NOTE: It's vital that you use ``!bg'' rather than ``!'' if the program
38#       you're running will take some time or will require network
39#       connectivity.  Using ``!'' will delay ppp 'till the completion
40#       of the program being run!
41#
42# You may also want some sound effects....
43#
44pmdemand:
45 !bg /etc/ppp/ppp.etherup.pmdemand
46 ! sh -c "cat /etc/ppp/linkup.au >/dev/audio"
47
48# If your minimum call charge is 5 minutes, you may as well stay on
49# the line for that amount of time.  If we want a 60 second subsequent
50# timeout, set your timeout to 300 in ppp.conf and then do this:
51#
52min5minutes:
53 !bg sh -c "sleep 240; pppctl -p mypassword 3000 set timeout 60"
54