Code review comment for lp://staging/~nacl/wicd/1.6-dhcp-hostnames

Revision history for this message
Adam Blackburn (adamblackburn) wrote :

We debated adding support for dhclient, and in the end came to this conclusion:

Because, currently, when dhclient is run, the default configuration file (/etc/dhcp3/dhclient.conf) will be used. In order to change the hostname with dhclient, we would need to write out a configuration file of some sort. This leaves us with two options: either a) write a one line configuration file that contains only the send host-name line, or b) read the current dhclient.conf, do some processing (ie, grep -v "send host-name"; echo "send host-name randomhostname" >> /tmp/wicddhclient.conf) and then use the newly created file.

The disadvantage to writing a one line configuration file is that currently, dhclient reads /etc/dhcp3/dhclient.conf when run. This would mean that enabling sending the hostname in Wicd could result in radically different behavior then not sending the hostname.

The disadvantage to rewriting the existing file is that a) there might be some syntactical thing I haven't seen/thought of that would mess up my proposed method of rewriting, and b) would require a bit more code in the daemon.

If we were to enable support for this in dhclient, I'd recommend rewriting the existing configuration file.

review: Needs Information

« Back to merge proposal