Comment 8 for bug 1084064

Paul Larson (pwlars) wrote :

ignore the .local stuff, that's just avahi madness and doesn't seem to be related. Here's what I'm seeing locally when I try this:
I'm noticing from the dnsmasq server that in the leases file, if I start a quantal vm I see the hostname. I also see the hostname pop up in the syslog. If I start up a raring vm though, I don't see the hostname ever come across. I went to a raring vm and ran dhclient by hand, and everything worked. The hostname was sent with the dhcp request, and I could access the system by sshing or pinging the hostname alone. Running dhcpclient alone uses the default config under /etc though. With NetworkManager in the picture though, a different config file is used:

$ ps -ef |grep dhclient
root 733 693 0 21:44 ? 00:00:00 /sbin/dhclient -d -4 -sf /usr/lib/NetworkManager/nm-dhcp-client.action -pf /run/sendsigs.omit.d/network-manager.dhclient-eth0.pid -lf /var/lib/dhclient/dhclient-0f1c7278-f6f0-4447-a3a7-40c0c7c300d6-eth0.lease -cf /var/run/nm-dhclient-eth0.conf eth0

$ cat /var/run/nm-dhclient-eth0.conf
# Created by NetworkManager

option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
option ms-classless-static-routes code 249 = array of unsigned integer 8;
option wpad code 252 = string;

also request rfc3442-classless-static-routes;
also request ms-classless-static-routes;
also request wpad;
also request ntp-servers;

If I look another system I have, I see the addition of this line in that file:
send host-name "myhostname"; # added by NetworkManager

So it looks like nm is generating this file without putting the line in to send the hostname.