Date: Fri, 25 Jul 2003 11:58:25 -0400 (EDT) From: Kenneth Culver <culverk@yumyumyum.org> To: Shawn <drevil@warpcore.org> Cc: freebsd-questions@freebsd.org Subject: Re: Dynamic Hostname Assignment Message-ID: <20030725115740.Y24957@alpha.yumyumyum.org> In-Reply-To: <1059098593.630.13.camel@CPE-65-26-140-154.kc.rr.com> References: <1059098593.630.13.camel@CPE-65-26-140-154.kc.rr.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> hostname_start()
> {
> ip=`ifconfig xl0 | grep 'inet ' | awk '{print $2}'`
> # Set the host name if it is not already set
> #
> if [ -z "`hostname -s`" ]; then
> if [ $ip ]; then
> hostname=`host $ip | awk '{print $5}'`
> hostname ${hostname}
> echo "Setting hostname: `hostname`."
> fi
> fi
> }
>
> I then symlinked /etc/rc.d/hostname to
> /usr/local/etc/rc.d/001.hostname.sh so that after the network interface
> and everything had been brought up it would set my hostname correctly.
> I'm sure this is probably an ugly and unnecessary hack, but I could find
> no other way to get my hostname to be set properly :]
>
> I'm quite willing to go debug or rip apart dhclient to figure out why it
> isn't grabbing the hostname if someone points me in the right direction.
> Any suggestions?
>
Most likely, dhclient isn't what's setting it on redhat, it's probably a
support script in redhat that's doing it.
Ken
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030725115740.Y24957>
