]>
Commit | Line | Data |
---|---|---|
763b88c2 AM |
1 | #!/bin/sh |
2 | # | |
ec8b15cb | 3 | # $Id$ |
763b88c2 AM |
4 | # |
5 | # This script is run by the pppd after the link is established. | |
6 | # | |
7 | # This script is called with the following arguments: | |
5e6dfc29 JR |
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 | |
763b88c2 AM |
14 | |
15 | set +e | |
16 | ||
5e6dfc29 | 17 | # The environment is cleared before executing this script |
763b88c2 AM |
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 | |
5e6dfc29 | 30 | . /etc/sysconfig/network-scripts/functions.network |
763b88c2 AM |
31 | CONFIG="$PPP_IPPARAM" |
32 | source_config | |
33 | ||
34 | # as an additional convenience, $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. | |
5e6dfc29 | 40 | [ -x /etc/ppp/auth-up.local ] && /etc/ppp/auth-up.local |
763b88c2 AM |
41 | |
42 | exit 0 |