1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
#!/bin/sh
# ip-down <interface> <myaddr> <daemon-pid> <local> <remote> <arg>
# Sample of the ip-down script.
# This is called when the CIPE interface is taken down.
# Arguments:
# $1 interface the CIPE interface
# $2 myaddr our UDP address
# $3 daemon-pid the daemon's process ID
# $4 local IP address of our CIPE device
# $5 remote IP address of the remote CIPE device
# $6 arg argument supplied via options
# Purposes for this script: set up routes, set up proxy-arps, etc.
# start daemons, logging...
# The environment is cleared before executing this script
# so the path must be reset
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
export PATH
# These variables are for the use of the scripts run by run-parts
CIPE_IFACE="$1"
CIPE_CARRIER="$2"
CIPE_PID="$3"
CIPE_LOCAL="$4"
CIPE_REMOTE="$5"
CIPE_IPPARAM="$6"
export CIPE_IFACE CIPE_CARRIER CIPE_PID CIPE_LOCAL CIPE_REMOTE CIPE_IPPARAM
IFACE=${CIPE_IFACE}
IF_ADDRESS=${CIPE_LOCAL}
export IFACE IF_ADDRESS
# Main Script starts here
run-parts /etc/cipe/ip-down.d
# last line
|