]> git.pld-linux.org Git - projects/rc-scripts.git/blame - ppp/ip-down
- scripts now ready to exec run-parts for each of interfaces going up/down,
[projects/rc-scripts.git] / ppp / ip-down
CommitLineData
b87efb1f 1#!/bin/sh
b0443108 2#
8dbd5412 3# $Id: ip-down,v 1.5 2000/05/07 19:00:00 siefca Exp $
7742e157
AF
4# This file should not be modified
5#
6# This script is run by the pppd _after_ the link is brought down.
7# It uses run-parts to run scripts in /etc/ppp/ip-down.d, so to delete
8# routes, unset IP addresses etc. you should create script(s) there.
9#
10# Be aware that other packages may include /etc/ppp/ip-down.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 Local IP number 12.34.56.78
19# $5 Peer IP number 12.34.56.99
20# $6 Optional ``ipparam'' value foo
21
22# The environment is cleared before executing this script
23# so the path must be reset
24PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
25export PATH
26# These variables are for the use of the scripts run by run-parts
27PPP_IFACE="$1"
28PPP_TTY="$2"
29PPP_SPEED="$3"
30PPP_LOCAL="$4"
31PPP_REMOTE="$5"
32PPP_IPPARAM="$6"
33export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
34
eb4dd2c6
JK
35. /etc/sysconfig/network-scripts/.functions
36CONFIG="$PPP_IPPARAM"
37source_config
38
7742e157
AF
39# as an additional convienince, $PPP_TTYNAME is set to the tty name,
40# stripped of /dev/ (if present) for easier matching.
eb4dd2c6 41PPP_TTYNAME=`/usr/bin/basename "$PPP_TTY"`
7742e157
AF
42export PPP_TTYNAME
43
7742e157
AF
44# Main Script starts here
45
8dbd5412 46run-parts /etc/sysconfig/interfaces/down.d
7742e157 47
eb4dd2c6 48/etc/sysconfig/network-scripts/ifdown-post "${CONFIG}"
7742e157
AF
49
50exit 0
This page took 0.033347 seconds and 4 git commands to generate.