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