#!/bin/bash
# Example connected IP hook.
#
# Connected IP hooks are run with the "start" argument after a connected IP is
# added and with the "stop" argument before it is removed.
#
# Environment variables:
#   ID: the connected IP ID
#   BOND_ID: the ID of the connected IP's bond
#   IP: the IP address assigned to the interface
#   NETMASK: the netmask of the IP
#   NETWORK: the network address of the IP/netmask combination
#   INTERFACE: the interface that receives the IP address. Only set on bonders
#   AGG_ROUTING: string describing aggregator routing mode: one of "auto",
#     "always", or "never".


start () {
    remove 2> /dev/null
    true
}
stop () {
    remove
}
remove () {
    true
}

# Avoid changing anything below here.
case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    *)
        echo "Usage: $0 {start|stop}"
        exit 1
        ;;
esac
