]> git.pld-linux.org Git - projects/rc-scripts.git/blob - ppp/auth-down
619dcbf4f51aa99543c05231c98fccb8e8c3c93b
[projects/rc-scripts.git] / ppp / auth-down
1 #!/bin/sh
2 #
3 # $Id$
4 #
5 # This script is run by the pppd _after_ the link is brought down.
6 #
7 # This script is called with the following arguments:
8 #       Arg     Name                    Example
9 #       $1      Interface name          ppp0
10 #       $2      Peer name
11 #       $3      User name
12 #       $4      The tty                 ttyS1
13 #       $5      The link speed          38400
14
15 set +e
16
17 # The environment is cleared before executing this script
18 # so the path must be reset
19 PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
20 export PATH
21 # These variables are for the use of the scripts run by run-parts
22 PPP_IFACE="$1"
23 PPP_PEER="$2"
24 PPP_USER="$3"
25 PPP_TTY="$4"
26 PPP_SPEED="$5"
27 export PPP_IFACE PPP_PEER PPP_USER PPP_TTY PPP_SPEED
28
29 . /etc/rc.d/init.d/functions
30 . /lib/rc-scripts/functions.network
31 CONFIG="$PPP_IPPARAM"
32 source_config
33
34 # as an additional convienince, $PPP_TTYNAME is set to the tty name,
35 # stripped of /dev/ (if present) for easier matching.
36 PPP_TTYNAME=$(basename "$PPP_TTY")
37 export PPP_TTYNAME
38
39 # Main Script starts here
40 [ -x /etc/ppp/auth-down.local ] && /etc/ppp/auth-down.local
41
42 exit 0
This page took 0.225687 seconds and 2 git commands to generate.