#!/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.

# Logging example: fetch device statistics
# (note that these persist across close/open sequence)
# the entry is still there, just ifconfig hides it
fgrep $1 /proc/net/dev >> /tmp/cipe

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

exit 0
