ddclient/svn/sample-etc_dhclient-exit-hooks
wimpunk 787b76f4a3 Created trunk and tags, moved directories to it
git-svn-id: svn+ssh://svn.code.sf.net/p/ddclient/code/trunk@8 3873ddee-7413-0410-b6c4-c2c57c1ab35a
2006-06-14 19:51:39 +00:00

17 lines
570 B
Bash

#!/bin/sh
######################################################################
## $Id$
######################################################################
# The /etc/dhclient-enter-hooks script is run by the ISC DHCP client's standard
# update script whenever dhclient obtains or renews an address.
PATH=/usr/sbin:${PATH}
case "$new_ip_address" in
10.*) ;;
172.1[6-9].* | 172.2[0-9].* | 172.3[0-1].*) ;;
192.168.*) ;;
*)
logger -t dhclient IP address changed to $new_ip_address
ddclient -daemon=0 -syslog -use=ip -ip=$new_ip_address >/dev/null 2>&1
;;
esac