File: ip-down

package info (click to toggle)
cipe 1.5.4free-9
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 908 kB
  • ctags: 730
  • sloc: ansic: 5,976; sh: 358; makefile: 315; asm: 200; perl: 45
file content (22 lines) | stat: -rwxr-xr-x 559 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# ip-down <interface> <myaddr> <daemon-pid> <local> <remote> <arg>

# Sample of the ip-down script.
# This is called with the same arguments as ip-up after the device was
# closed. It can be used for removing proxyarps, or (like here)
# for logging purposes, etc.

umask 022
PATH=/sbin:/bin:/usr/sbin:/usr/bin

# Logging example
now=`date "+%b %d %T"`
echo "$now DOWN $*" >> /var/log/cipe.log

# remove the daemon PID file
rm -f /var/run/cipe/$6.pid /var/run/cipe/$1.pid

# If the system runs gated, tell it what has happened
#gdc interface

exit 0