[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Using a DHCP-provided host name in debian-live



Hi $LIST,

as most of you probably know, it is not only possible to send a host
name via DHCP, but also to request one (i.e. instead of the client
telling the server "Hi, I'm foobar.", it's possible to send "Hi, what's
my name?" and the DHCP server will reply with "Hi, you're barney.")

I've been wondering why Debian-Live wouldn't pick up on this
server-provided name.  Turns out it is because the default host name set
by Debian-Live is "debian", while the stock DHCP client scripts expect
the hostname to be "localhost", or else they will assume a hostname has
already been set and should take precedence, so they won't touch it.

The fix for this is to use the boot parameter:
hostname=localhost

(But also see
http://blog.schlomo.schapiro.org/2013/11/setting-hostname-from-dhcp-in-debian.html
for a bug that might cause issues even if you use hostname=localhost -
not sure if it applies to Debian-Live.)

Is there any chance that this could be added to the documentation
somewhere, either debian-live or dhclient?
A comment in /etc/dhcp/dhclient.conf underneath the block starting with
"request" would probably do.
Something like
# Note: For the command "request host-name" to work, make sure your
        initial client name is set to "localhost".

Kind Regards,
Stefan Baur


Reply to: