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