]>
Commit | Line | Data |
---|---|---|
b87efb1f | 1 | #!/bin/sh |
b0443108 | 2 | # |
7742e157 AF |
3 | # This file should not be modified |
4 | # | |
5 | # This script is run by the pppd _after_ the link is brought down. | |
7742e157 AF |
6 | # |
7 | # This script is called with the following arguments: | |
5e6dfc29 JR |
8 | # Arg Name Example |
9 | # $1 Interface name ppp0 | |
10 | # $2 The tty ttyS1 | |
11 | # $3 The link speed 38400 | |
12 | # $4 Local IP number 12.34.56.78 | |
13 | # $5 Peer IP number 12.34.56.99 | |
14 | # $6 Optional ``ipparam'' value foo | |
7742e157 | 15 | |
763b88c2 AM |
16 | set +e |
17 | ||
5e6dfc29 | 18 | # The environment is cleared before executing this script |
7742e157 AF |
19 | # so the path must be reset |
20 | PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin | |
21 | export PATH | |
22 | # These variables are for the use of the scripts run by run-parts | |
23 | PPP_IFACE="$1" | |
24 | PPP_TTY="$2" | |
25 | PPP_SPEED="$3" | |
26 | PPP_LOCAL="$4" | |
27 | PPP_REMOTE="$5" | |
28 | PPP_IPPARAM="$6" | |
29 | export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM | |
30 | ||
763b88c2 | 31 | . /etc/rc.d/init.d/functions |
f67ce454 | 32 | . /lib/rc-scripts/functions.network |
635385ab | 33 | CONFIG="/etc/sysconfig/interfaces/ifcfg-$PPP_IPPARAM" |
eb4dd2c6 JK |
34 | source_config |
35 | ||
7742e157 AF |
36 | # as an additional convienince, $PPP_TTYNAME is set to the tty name, |
37 | # stripped of /dev/ (if present) for easier matching. | |
763b88c2 | 38 | PPP_TTYNAME=$(basename "$PPP_TTY") |
7742e157 AF |
39 | export PPP_TTYNAME |
40 | ||
7742e157 | 41 | # Main Script starts here |
763b88c2 | 42 | [ -x /etc/ppp/ip-down.local ] && /etc/ppp/ip-down.local |
7742e157 | 43 | |
dd4a755f | 44 | run-parts /etc/sysconfig/interfaces/down.d/ppp |
7742e157 | 45 | |
f67ce454 | 46 | /lib/rc-scripts/ifdown-post "${CONFIG}" |
7742e157 AF |
47 | |
48 | exit 0 |