]> git.pld-linux.org Git - projects/rc-scripts.git/blob - ppp/ip-down
3ca963dbe521860cc6213855567f58fd5d20dde4
[projects/rc-scripts.git] / ppp / ip-down
1 #!/bin/sh
2 #
3 # $Id: ip-down,v 1.3 1999/07/27 02:51:44 kloczek Exp $
4 # This file should not be modified
5 #
6 # This script is run by the pppd _after_ the link is brought down.
7 # It uses run-parts to run scripts in /etc/ppp/ip-down.d, so to delete
8 # routes, unset IP addresses etc. you should create script(s) there.
9 #
10 # Be aware that other packages may include /etc/ppp/ip-down.d scripts (named
11 # after that package), so choose local script names with that in mind.
12 #
13 # This script is called with the following arguments:
14 #    Arg  Name                          Example
15 #    $1   Interface name                ppp0
16 #    $2   The tty                       ttyS1
17 #    $3   The link speed                38400
18 #    $4   Local IP number               12.34.56.78
19 #    $5   Peer  IP number               12.34.56.99
20 #    $6   Optional ``ipparam'' value    foo
21
22 # The  environment is cleared before executing this script
23 # so the path must be reset
24 PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
25 export PATH
26 # These variables are for the use of the scripts run by run-parts
27 PPP_IFACE="$1"
28 PPP_TTY="$2"
29 PPP_SPEED="$3"
30 PPP_LOCAL="$4"
31 PPP_REMOTE="$5"
32 PPP_IPPARAM="$6"
33 export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
34
35 # as an additional convienince, $PPP_TTYNAME is set to the tty name,
36 # stripped of /dev/ (if present) for easier matching.
37 PPP_TTYNAME=`/usr/bin/basename "$2"`
38 export PPP_TTYNAME
39
40 # Other things
41 LOGDEVICE=$6
42 REALDEVICE=$1
43
44 # Main Script starts here
45
46 run-parts /etc/ppp/ip-down.d
47
48 /etc/sysconfig/network-scripts/ifdown-post ifcfg-${LOGDEVICE}
49
50 exit 0
This page took 0.025062 seconds and 3 git commands to generate.