#! /bin/sh
# send notification after ip address is changed

if [ "$1" == "eth0" -o "$1" == "bond0" -o "$1" == "" ]; then
	for i in lcmd netmsgd; do
		[ -f /etc/init.d/$i ] && /etc/init.d/$i reload >/dev/null 2>&1
	done
fi

for i in slpd; do
	[ -f /etc/init.d/$i ] && /etc/init.d/$i restart $1 >/dev/null 2>&1
done

# update /etc/hosts
/usr/bin/update_hosts.sh

exit 0
