HOSTNAME form DNS/DHCP server
Pieter Donche
Pieter.Donche at ua.ac.be
Thu Jul 2 08:35:51 UTC 2009
Sorry, my previous mail to the list had the wrong Subject.
---------- Forwarded message ----------
Date: Thu, 2 Jul 2009 10:26:54 +0200 (CEST)
From: Pieter Donche <Pieter.Donche at ua.ac.be>
To: ubuntu-users at lists.ubuntu.com
Subject: Re: ubuntu-users Digest, Vol 58, Issue 328
> Date: Tue, 30 Jun 2009 09:22:52 +1000
> From: Karl Auer <kauer at biplane.com.au>
> Subject: Re: HOSTNAME from DNS name server
>
> On Mon, 2009-06-29 at 16:50 +0200, Pieter Donche wrote:
>>> An alternative might be to set the hostname locally based on information
>>> already in the DNS.
>
> I've had a closer look at dhclient-script, and it looks like it will set
> the hostname for you *anyway* - you just have to make sure that there is
> no hostname already set. That is, it will not override an existing
> hostname.
>
> How you unset the hostname is not clear to me yet. Nor am I sure that it
> uses the DNS name - it uses the host name sent by the DHCP server, which
> is not necessarily from the DNS, but probably could be - check the DHCP
> server settings, I guess.
When installing Ubuntu, it ask for a hostname. You can't leave it blank
otherwise the button 'Forward' stays gray and you can't proceed ...
( In OpenSUSE during install you have an option 'Change Hostname via DHCP'
wich is even default checked .. )
So far I was unsuccessfull in fiddling with /etc/dhcp3/dhclient.conf
It contains a line
#script "/etc/dhcp3/dhclient-script";
which does not exist (??)
The comments in the /etc/dhcp3/chclient-exit-hooks.d/debug script
state that purpose is to show the variables available to the scripts
in that exit-hooks directory and "all these scripts are called from
/etc/dhcp3/dhclient-script", but that script does not exist !
confusing? wrong documentation ??
But there is a file sbin/dhclient-script
I tried $ sudo vi /etc/dhcp3/dhclient.conf
#script "/etc/dhcp3/dhclient-script";
script "/sbin/dhclient-script";
and RUN="yes" in /etc/dhcp3/chclient-exit-hooks.d/debug
and rebooted.
Now I get output of the variables in /tmp/dhclient-script.debug
(the variable new_ip_address is set to the correct (statically
assigned) DHCP received IP address'
but ... I have no network connection (the icon in the top-taskbar is a blue
string spinning between two green balls for 30 seconds, then a message "No
network connection."
I also tried to rename /etc/dhcp3/chclient-exit-hooks.d
to /etc/dhcp3/chclient-exit-hooks.d.old, create a new
/etc/dhcp3/chclient-exit-hooks.d directory with only the debug script
in it (maybe the other scripts in /etc/dhcp3/chclient-exit-hooks.d
messed up things), but same behaviour ..
More information about the ubuntu-users
mailing list