File: sample-etc_dhclient-exit-hooks

package info (click to toggle)
ddclient 3.11.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,284 kB
  • sloc: perl: 14,597; sh: 916; makefile: 146; xml: 55
file content (15 lines) | stat: -rw-r--r-- 490 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
######################################################################
# 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/bin:${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