dhclient-exit-hooks weirdness

Reid Linnemann lreid at cs.okstate.edu
Fri Jul 15 13:03:46 GMT 2005


I'm using dhclient-script 1.4, and the following dhclient-exit-hooks
that worked prior to the OpenBSD dhclient import:

#!/bin/sh
PATH=/bin:/sbin:/usr/bin
if [ x$new_host_name != x ]; then
  if [ x$new_domain_name != x ]; then
    hostname $new_host_name.$new_domain_name
    echo New Hostname: $new_host_name.$new_domain_name
  else
    hostname $new_host_name
    echo New Hostname: $new_host_name
  fi
else
  hostname=`/usr/local/bin/resolveip -s $new_ip_address`
  hostname $hostname
  echo New Hostname: $hostname
fi

When dhclient starts on the interface (rl0) during system boot,
dhclient-exit-hooks is invoked before dhclient reports it has even
recieved a DHCPACK, and the console is cluttered with resolveip's usage
message. $new_ip_address is empty when dhclient-exit-hooks is invoked,
and the hostname of the system remains bogus. Is anyone else having
similar trouble? Is my dhclient-exit-hooks actually sane?

Thanks,
Reid


More information about the freebsd-current mailing list