]> git.pld-linux.org Git - projects/rc-scripts.git/blob - ppp/ipx-up
- started merging TOTALNEW
[projects/rc-scripts.git] / ppp / ipx-up
1 #!/bin/sh
2 #
3 # $Id: ipx-up,v 1.2 2002/03/19 18:18:06 misiek Exp $
4 # This file should not be modified
5 #
6 # This script is run by the pppd after the link is established.
7 # It uses run-parts to run scripts in /etc/ppp/ip-up.d, so to add routes,
8 # set IP address, run the mailq etc. you should create script(s) there.
9 #
10 # Be aware that other packages may include /etc/ppp/ip-up.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   The network number            ???
19 #    $5   Local IPX node address        ???
20 #    $6   Remote IPX node address       ???
21 #    $7   Local IPX routing protocol    ???
22 #    $8   Remote IPX routing protocol   ???
23 #    $9   Local IPX router name         ???
24 #    $10  Remote IPX router name        ???
25 #    $11  Optional ``ipparam'' value    foo
26 #    $12  PPPD pid                      1276
27
28 set +e
29
30 # The  environment is cleared before executing this script
31 # so the path must be reset
32 PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
33 export PATH
34 # These variables are for the use of the scripts run by run-parts
35 PPP_IFACE="$1"
36 PPP_TTY="$2"
37 PPP_SPEED="$3"
38 PPP_NETWORK="$4"
39 PPP_LOCAL="$5"
40 PPP_REMOTE="$6"
41 PPP_LOCAL_RPROTO="$7"
42 PPP_REMOTE_RPROTO="$8"
43 PPP_LOCAL_RNAME="$9"
44 PPP_REMOTE_RNAME="$10"
45 PPP_IPPARAM="$11"
46 PPP_PID="$12"
47
48 export PPP_IFACE PPP_TTY PPP_SPEED PPP_NETWORK PPP_LOCAL PPP_REMOTE
49 export PPP_LOCAL_RPROTO PPP_REMOTE_RPROTO PPP_LOCAL_RNAME PPP_REMOTE_RNAME
50 export PPP_IPPARAM PPP_PID
51
52 . /etc/rc.d/init.d/functions
53 . /etc/sysconfig/network-scripts/functions.network 
54 CONFIG="$PPP_IPPARAM"
55 source_config
56
57 # as an additional convenience, $PPP_TTYNAME is set to the tty name,
58 # stripped of /dev/ (if present) for easier matching.
59 PPP_TTYNAME=$(basename "$PPP_TTY")
60 export PPP_TTYNAME
61
62 # Main Script starts here
63 [ -x /etc/ppp/ipx-up.local ] && /etc/ppp/ipx-up.local 
64
65 run-parts /etc/sysconfig/interfaces/up.d/ipx
66
67 exit 0
This page took 0.029984 seconds and 3 git commands to generate.