dhclient.conf is edited to ensure that a hostname is send. There was some debug and incorrect code left (patch follows). Moreover, i would like the editing code to be removed, or at least to default to 'false', the reason is that it can remove any 'send host-name' statement even if it is in the scope of an 'interface'. For example if there is: interface "lan" { send host-name "lan"; } interface "wlan" { send host-name "wlan"; } it will remove both statements. If you want the 'edit' option to remain, you could use a different config file (and this way don't erase the user config file). Regards, Benoit Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 64669 [details, diff] correct edition of dhclient.conf
Thanks for the patch! To stop dhclient from editing your config, you can do the following dhcp_eth0="nosendhost" or dhclient_edit_config_eth0="no" fixed in baselayout-1.12.0_pre3-r1
(In reply to comment #2) > To stop dhclient from editing your config, you can do the following > dhcp_eth0="nosendhost" > or > dhclient_edit_config_eth0="no" I saw it, but i consider it bad to change a config file without notifying the user (portage doesn't do it). I was surprised to found the 'send host-name "fu2"' in my dhclient.conf. In my opinion it isn't sane to do it by default. Regards, Benoit
Would you be happy if we can patch dhclient to send a hostname via the commandline instead of editing the config file? The commandline would override the config file settings (if any) Re-open the bug if you agree or dis-agree with this and explain why. Thanks.
(In reply to comment #4) > Would you be happy if we can patch dhclient to send a hostname via the > commandline instead of editing the config file? The commandline would override > the config file settings (if any) I think it is not worth the effort or you should write a complete set of commandline options for consistency. dhcpcd and udhcp have a commandline interface (and *no* config file), and i don't think we should try to imitate this. Because both have a commandline interface, all options should be handled by the init-script. Since dhclient have a config file, a comment should be put in the netscripts to indicate this. One of the reason i use gentoo is that it doesn't mess with my config file, i didn't like when e.g. debian touched my config files. So i will be happy if the new initscripts don't do this. If you want i can write a patch to remove the edit stuff. Thank you. Benoit > Re-open the bug if you agree or dis-agree with this and explain why. > > Thanks. ps: i appreciate very much your work on the netscripts
Yeah, you're right. We should not edit user configs by default. The change has been made, no version bump though. If you re-sync and re-emerge it you should get the new file.