summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-down
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/ppp/ppp-2.4.5/ip-down')
-rwxr-xr-xmeta/recipes-connectivity/ppp/ppp-2.4.5/ip-down43
1 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-down b/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-down
new file mode 100755
index 0000000000..06d35487a5
--- /dev/null
+++ b/meta/recipes-connectivity/ppp/ppp-2.4.5/ip-down
@@ -0,0 +1,43 @@
1#!/bin/sh
2#
3# $Id: ip-down,v 1.2 1998/02/10 21:21:55 phil Exp $
4#
5# This script is run by the pppd _after_ the link is brought down.
6# It uses run-parts to run scripts in /etc/ppp/ip-down.d, so to delete
7# routes, unset IP addresses etc. you should create script(s) there.
8#
9# Be aware that other packages may include /etc/ppp/ip-down.d scripts (named
10# after that package), so choose local script names with that in mind.
11#
12# This script is called with the following arguments:
13# Arg Name Example
14# $1 Interface name ppp0
15# $2 The tty ttyS1
16# $3 The link speed 38400
17# $4 Local IP number 12.34.56.78
18# $5 Peer IP number 12.34.56.99
19# $6 Optional ``ipparam'' value foo
20
21# The environment is cleared before executing this script
22# so the path must be reset
23PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
24export PATH
25# These variables are for the use of the scripts run by run-parts
26PPP_IFACE="$1"
27PPP_TTY="$2"
28PPP_SPEED="$3"
29PPP_LOCAL="$4"
30PPP_REMOTE="$5"
31PPP_IPPARAM="$6"
32export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
33
34# as an additional convenience, $PPP_TTYNAME is set to the tty name,
35# stripped of /dev/ (if present) for easier matching.
36PPP_TTYNAME=`/usr/bin/basename "$2"`
37export PPP_TTYNAME
38
39# Main Script starts here
40
41run-parts /etc/ppp/ip-down.d
42
43# last line