Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 184905

Summary: net-misc/networkmanager-0.6.5 ignores /etc/conf.d/hostname
Product: Gentoo Linux Reporter: Daniele Tamino <asloxx>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch that fixes the problem (or at least, works for me)

Description Daniele Tamino 2007-07-10 21:48:33 UTC
When connecting via DHCP, NetworkManager completely ignores the hostname in /etc/conf.d/hostname and sets it to something like DHCP-X-Y, which is bad and causes other problems, as other programs expects the hostname to be different.

With a little debugging effort I've found the bug, and I'll attach a patch.

Reproducible: Always
Comment 1 Daniele Tamino 2007-07-10 21:51:11 UTC
Created attachment 124480 [details, diff]
Patch that fixes the problem (or at least, works for me)

It's just that in NetworkManagerGentoo.c, the variable sys_data->config is initialized after being used, or not initialized at all, so reading the hostname from the config file and putting it into the config hash table fails.
This patch seems to fix it.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-07-11 07:00:09 UTC

*** This bug has been marked as a duplicate of bug 176873 ***