Date: Fri, 15 Jul 2005 08:03:45 -0500 (CDT) From: "Reid Linnemann" <lreid@cs.okstate.edu> To: freebsd-current@freebsd.org Subject: dhclient-exit-hooks weirdness Message-ID: <20050715130345.80C0EA068C@csa.cs.okstate.edu>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050715130345.80C0EA068C>
