]> git.pld-linux.org Git - projects/rc-scripts.git/blame_incremental - ppp/ip-down
mdadm: accept "DEVICE partitions" as indication to start mdadm
[projects/rc-scripts.git] / ppp / ip-down
... / ...
CommitLineData
1#!/bin/sh
2#
3# This file should not be modified
4#
5# This script is run by the pppd _after_ the link is brought down.
6#
7# This script is called with the following arguments:
8# Arg Name Example
9# $1 Interface name ppp0
10# $2 The tty ttyS1
11# $3 The link speed 38400
12# $4 Local IP number 12.34.56.78
13# $5 Peer IP number 12.34.56.99
14# $6 Optional ``ipparam'' value foo
15
16set +e
17
18# The environment is cleared before executing this script
19# so the path must be reset
20PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
21export PATH
22# These variables are for the use of the scripts run by run-parts
23PPP_IFACE="$1"
24PPP_TTY="$2"
25PPP_SPEED="$3"
26PPP_LOCAL="$4"
27PPP_REMOTE="$5"
28PPP_IPPARAM="$6"
29export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
30
31. /etc/rc.d/init.d/functions
32. /lib/rc-scripts/functions.network
33CONFIG="/etc/sysconfig/interfaces/ifcfg-$PPP_IPPARAM"
34source_config
35
36# as an additional convienince, $PPP_TTYNAME is set to the tty name,
37# stripped of /dev/ (if present) for easier matching.
38PPP_TTYNAME=$(basename "$PPP_TTY")
39export PPP_TTYNAME
40
41# Main Script starts here
42[ -x /etc/ppp/ip-down.local ] && /etc/ppp/ip-down.local
43
44run-parts /etc/sysconfig/interfaces/down.d/ppp
45
46/lib/rc-scripts/ifdown-post "${CONFIG}"
47
48exit 0
This page took 0.025196 seconds and 4 git commands to generate.