]> git.pld-linux.org Git - projects/rc-scripts.git/blob - ppp/ipx-down
move status all to function
[projects/rc-scripts.git] / ppp / ipx-down
1 #!/bin/sh
2 #
3 # $Id$
4 # This file should not be modified
5 #
6 # This script is run by the pppd after the link is established.
7 #
8 # This script is called with the following arguments:
9 #       Arg     Name                            Example
10 #       $1      Interface name                  ppp0
11 #       $2      The tty                         ttyS1
12 #       $3      The link speed                  38400
13 #       $4      The network number              ???
14 #       $5      Local IPX node address          ???
15 #       $6      Remote IPX node address         ???
16 #       $7      Local IPX routing protocol      ???
17 #       $8      Remote IPX routing protocol     ???
18 #       $9      Local IPX router name           ???
19 #       $10     Remote IPX router name          ???
20 #       $11     Optional ``ipparam'' value      foo
21 #       $12     PPPD pid                        1276
22
23 set +e
24
25 # The environment is cleared before executing this script
26 # so the path must be reset
27 PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
28 export PATH
29 # These variables are for the use of the scripts run by run-parts
30 PPP_IFACE="$1"
31 PPP_TTY="$2"
32 PPP_SPEED="$3"
33 PPP_NETWORK="$4"
34 PPP_LOCAL="$5"
35 PPP_REMOTE="$6"
36 PPP_LOCAL_RPROTO="$7"
37 PPP_REMOTE_RPROTO="$8"
38 PPP_LOCAL_RNAME="$9"
39 PPP_REMOTE_RNAME="$10"
40 PPP_IPPARAM="$11"
41 PPP_PID="$12"
42
43 export PPP_IFACE PPP_TTY PPP_SPEED PPP_NETWORK PPP_LOCAL PPP_REMOTE
44 export PPP_LOCAL_RPROTO PPP_REMOTE_RPROTO PPP_LOCAL_RNAME PPP_REMOTE_RNAME
45 export PPP_IPPARAM PPP_PID
46
47 . /etc/rc.d/init.d/functions
48 . /etc/sysconfig/network-scripts/functions.network
49 CONFIG="$PPP_IPPARAM"
50 source_config
51
52 # as an additional convenience, $PPP_TTYNAME is set to the tty name,
53 # stripped of /dev/ (if present) for easier matching.
54 PPP_TTYNAME=$(basename "$PPP_TTY")
55 export PPP_TTYNAME
56
57 # Main Script starts here
58 [ -x /etc/ppp/ipx-down.local ] && /etc/ppp/ipx-down.local
59
60 run-parts /etc/sysconfig/interfaces/down.d/ipx
61
62 exit 0
This page took 0.026554 seconds and 3 git commands to generate.