]> git.pld-linux.org Git - projects/rc-scripts.git/blame_incremental - ppp/ip-down
- proper CONFIG sources (needed to override DEVICE from pppd and get
[projects/rc-scripts.git] / ppp / ip-down
... / ...
CommitLineData
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 brought down.
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
17set +e
18
19# The environment is cleared before executing this script
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
31
32. /etc/rc.d/init.d/functions
33. /etc/sysconfig/network-scripts/functions.network
34CONFIG="/etc/sysconfig/interfaces/ifcfg-$PPP_IPPARAM"
35source_config
36
37# as an additional convienince, $PPP_TTYNAME is set to the tty name,
38# stripped of /dev/ (if present) for easier matching.
39PPP_TTYNAME=$(basename "$PPP_TTY")
40export PPP_TTYNAME
41
42# Main Script starts here
43[ -x /etc/ppp/ip-down.local ] && /etc/ppp/ip-down.local
44
45run-parts /etc/sysconfig/interfaces/down.d/ppp
46
47/etc/sysconfig/network-scripts/ifdown-post "${CONFIG}"
48
49exit 0
This page took 0.056292 seconds and 4 git commands to generate.