]> git.pld-linux.org Git - projects/rc-scripts.git/blame - ppp/ip-up
update vim ignores
[projects/rc-scripts.git] / ppp / ip-up
CommitLineData
b87efb1f 1#!/bin/sh
b0443108 2#
ec8b15cb 3# $Id$
7742e157 4# This file should not be modified
b0443108 5#
7742e157 6# This script is run by the pppd after the link is established.
7742e157
AF
7#
8# This script is called with the following arguments:
5e6dfc29
JR
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
7742e157 16
763b88c2
AM
17set +e
18
5e6dfc29 19# The environment is cleared before executing this script
7742e157
AF
20# so the path must be reset
21PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
22export PATH
23# These variables are for the use of the scripts run by run-parts
24PPP_IFACE="$1"
25PPP_TTY="$2"
26PPP_SPEED="$3"
27PPP_LOCAL="$4"
28PPP_REMOTE="$5"
29PPP_IPPARAM="$6"
30export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
763b88c2 31
5e6dfc29 32. /etc/rc.d/init.d/functions
f67ce454 33. /lib/rc-scripts/functions.network
635385ab 34CONFIG="/etc/sysconfig/interfaces/ifcfg-$PPP_IPPARAM"
b9fbcc51 35source_config
7742e157
AF
36
37# as an additional convenience, $PPP_TTYNAME is set to the tty name,
38# stripped of /dev/ (if present) for easier matching.
763b88c2 39PPP_TTYNAME=$(basename "$PPP_TTY")
7742e157
AF
40export PPP_TTYNAME
41
7742e157 42# Main Script starts here
763b88c2
AM
43[ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local
44
8dbd5412 45run-parts /etc/sysconfig/interfaces/up.d/ppp
7742e157 46
f67ce454 47/lib/rc-scripts/ifup-post "$CONFIG"
7742e157
AF
48
49exit 0
This page took 0.123758 seconds and 4 git commands to generate.