xref: /dflybsd-src/share/examples/ppp/ppp.linkup.sample (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
186d7f5d3SJohn Marino#########################################################################
286d7f5d3SJohn Marino#
386d7f5d3SJohn Marino#          Example of ppp.linkup file
486d7f5d3SJohn Marino#
586d7f5d3SJohn Marino#  This file is checked when ppp establishes a connection.
686d7f5d3SJohn Marino#  ppp searches the labels in this file as follows:
786d7f5d3SJohn Marino#
886d7f5d3SJohn Marino#  1) The label that matches the IP number assigned to our side.
986d7f5d3SJohn Marino#
1086d7f5d3SJohn Marino#  2) The label specified on the command line to ppp.
1186d7f5d3SJohn Marino#
1286d7f5d3SJohn Marino#  3) If no label has been found, use MYADDR if it exists.
1386d7f5d3SJohn Marino#
1486d7f5d3SJohn Marino#
1586d7f5d3SJohn Marino# $FreeBSD: src/share/examples/ppp/ppp.linkup.sample,v 1.2 1999/08/28 00:19:31 peter Exp $
1686d7f5d3SJohn Marino# $DragonFly: src/share/examples/ppp/ppp.linkup.sample,v 1.2 2003/06/17 04:36:57 dillon Exp $
1786d7f5d3SJohn Marino#
1886d7f5d3SJohn Marino#########################################################################
1986d7f5d3SJohn Marino
2086d7f5d3SJohn Marino# It is no longer necessary to re-add the default route here as our
2186d7f5d3SJohn Marino# ppp.conf route is `sticky' (see the man page).
2286d7f5d3SJohn Marino# If you're into sound effects when the link comes up, you can run
2386d7f5d3SJohn Marino# ``auplay'' (assuming NAS is installed and configured).
2486d7f5d3SJohn Marino#
2586d7f5d3SJohn MarinoMYADDR:
2686d7f5d3SJohn Marino !bg /usr/X11R6/bin/auplay /etc/ppp/linkup.au
2786d7f5d3SJohn Marino
2886d7f5d3SJohn Marino# If we've got 192.244.176.32 as our address, then regard peer as a gateway
2986d7f5d3SJohn Marino# to 192.244.176.0 network.  This may also be done in ppp.conf instead.
3086d7f5d3SJohn Marino#
3186d7f5d3SJohn Marino192.244.176.32:
3286d7f5d3SJohn Marino add 192.244.176.0 0 HISADDR
3386d7f5d3SJohn Marino
3486d7f5d3SJohn Marino#You may want to execute a script after connecting.  This script can do
3586d7f5d3SJohn Marino# nice things such as kick off "sendmail -q", "popclient my.isp" and
3686d7f5d3SJohn Marino# "slurp -d news".  It can be passed MYADDR, HISADDR and INTERFACE
3786d7f5d3SJohn Marino# as arguments too - useful for informing a DNS of your assigned IP.
3886d7f5d3SJohn Marino#
3986d7f5d3SJohn Marino# You may also want some sound effects....
4086d7f5d3SJohn Marino#
4186d7f5d3SJohn Marinopmdemand:
4286d7f5d3SJohn Marino !bg /etc/ppp/ppp.etherup.pmdemand
4386d7f5d3SJohn Marino ! sh -c "cat /etc/ppp/linkup.au >/dev/audio"
4486d7f5d3SJohn Marino
4586d7f5d3SJohn Marino# If your minimum call charge is 5 minutes, you may as well stay on
4686d7f5d3SJohn Marino# the line for that amount of time.  If we want a 60 second subsequent
4786d7f5d3SJohn Marino# timeout, set your timeout to 300 in ppp.conf and then do this:
4886d7f5d3SJohn Marino#
4986d7f5d3SJohn Marinomin5minutes:
5086d7f5d3SJohn Marino !bg sh -c "sleep 240; pppctl -p mypassword 3000 set timeout 60"
51