]> git.pld-linux.org Git - projects/rc-scripts.git/blob - ppp/ip-up
- started merging TOTALNEW
[projects/rc-scripts.git] / ppp / ip-up
1 #!/bin/sh
2 #
3 # $Id: ip-up,v 1.6 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 #
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   Local IP number               12.34.56.78
14 #    $5   Peer  IP number               12.34.56.99
15 #    $6   Optional ``ipparam'' value    foo
16
17 set +e
18
19 # The  environment is cleared before executing this script
20 # so the path must be reset
21 PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
22 export PATH
23 # These variables are for the use of the scripts run by run-parts
24 PPP_IFACE="$1"
25 PPP_TTY="$2"
26 PPP_SPEED="$3"
27 PPP_LOCAL="$4"
28 PPP_REMOTE="$5"
29 PPP_IPPARAM="$6"
30 export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
31
32 . /etc/rc.d/init.d/functions 
33 . /etc/sysconfig/network-scripts/functions.network 
34 CONFIG="$PPP_IPPARAM"
35 source_config
36
37 # as an additional convenience, $PPP_TTYNAME is set to the tty name,
38 # stripped of /dev/ (if present) for easier matching.
39 PPP_TTYNAME=$(basename "$PPP_TTY")
40 export PPP_TTYNAME
41
42 # Main Script starts here
43 [ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local
44
45 run-parts /etc/sysconfig/interfaces/up.d/ppp
46
47 /etc/sysconfig/network-scripts/ifup-post "$CONFIG"
48
49 exit 0
This page took 0.028677 seconds and 3 git commands to generate.