Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100745 - baselayout-1.12.0_pre3: netscripts, dhclient.conf is incorrectly edited
Summary: baselayout-1.12.0_pre3: netscripts, dhclient.conf is incorrectly edited
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-29 11:50 UTC by Benoit Boissinot
Modified: 2005-07-31 22:58 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
correct edition of dhclient.conf (base.patch,697 bytes, patch)
2005-07-29 11:52 UTC, Benoit Boissinot
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benoit Boissinot 2005-07-29 11:50:54 UTC
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.
Comment 1 Benoit Boissinot 2005-07-29 11:52:04 UTC
Created attachment 64669 [details, diff]
correct edition of dhclient.conf
Comment 2 Roy Marples (RETIRED) gentoo-dev 2005-07-29 12:56:09 UTC
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
Comment 3 Benoit Boissinot 2005-07-29 13:35:21 UTC
(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
Comment 4 Roy Marples (RETIRED) gentoo-dev 2005-07-29 19:30:24 UTC
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.
Comment 5 Benoit Boissinot 2005-07-31 06:17:40 UTC
(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
Comment 6 Roy Marples (RETIRED) gentoo-dev 2005-07-31 22:58:30 UTC
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.