1 # Lookup the hostname in DNS if not set
5 [ -z "$new_ip_address" ] && return 1
7 # Silly ISC programs love to send error text to stdout
8 if type dig >/dev/null 2>&1; then
9 h=$(dig +short -x $new_ip_address)
11 echo "$h" | sed 's/\.$//'
14 elif type host >/dev/null 2>&1; then
15 h=$(host $new_ip_address)
18 | sed 's/.* domain name pointer \(.*\)./\1/'
27 if [ -z "$new_host_name" -a -z "$new_fqdn_name" ]; then
28 export new_host_name="$(lookup_hostname)"
33 BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT|STATIC) set_hostname;;