Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Networkmanager - prevent it from changing hostname
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Ahenobarbi
Retired Dev
Retired Dev


Joined: 02 Apr 2009
Posts: 345
Location: Warsaw, PL

PostPosted: Mon Aug 02, 2010 10:11 am    Post subject: [SOLVED] Networkmanager - prevent it from changing hostname Reply with quote

I'm using net-misc/networkmanager-0.7.2 (0.8 were crashing) and I don't want it to change my hostname (because when it does my X credential become outdated, so I can't start any new X app which is annoying). I looked around but didn't find any working solution. Could you help me solve this problem?[/code]

Code:
 # equery u net-misc/networkmanager
[ Legend : U - flag is set in make.conf       ]
[        : I - package is installed with flag ]
[ Colors : set, unset                         ]
 * Found these USE flags for net-misc/networkmanager-0.7.2:
 U I
 - - avahi              : Add avahi/Zeroconf support
 - - connection-sharing : Use net-dns/dnsmasq and net-firewall/iptables for connection sharing
 - - dhclient           : Use dhclient from net-misc/dhcp for getting ip.
 + + dhcpcd             : Use net-misc/dhcpcd for getting ip.
 - - doc                : Adds extra documentation (API, Javadoc, etc)
 + + gnutls             : Adds support for net-libs/gnutls (TLS 1.0 and SSL 3.0 support)
 - - nss                : Use dev-libs/nss for cryptography.
 + + resolvconf         : Use net-dns/openresolv for managing DNS information
# cat /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Inform the DHCP server of our hostname for DDNS.
hostname localhost
# To share the DHCP lease across OSX and Windows a ClientID is needed.
# Enabling this may get a different lease than the kernel DHCP client.
# Some upstream DHCP servers may also require a ClientID, such as FRITZ!Box.
#clientid

# A list of options to request from the DHCP server.
option classless_static_routes
option ntp_servers
option interface_mtu
require dhcp_server_identifier

# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname


Last edited by Ahenobarbi on Mon Aug 02, 2010 7:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
aderesch
Tux's lil' helper
Tux's lil' helper


Joined: 06 Mar 2010
Posts: 123
Location: Hamburg, Germany

PostPosted: Mon Aug 02, 2010 5:46 pm    Post subject: Re: Networkmanager - how to prevent it from changing hostnam Reply with quote

Make sure your /etc/NetworkManager/nm-system-settings.conf contains
Code:

[main]
plugins=keyfile

[keyfile]
hostname=<your hostname here>

As I am using 0.8 I haven't checked whether 0.7.2 does indeed honor it, but I think I had it in there back then as well.

ad
Back to top
View user's profile Send private message
Ahenobarbi
Retired Dev
Retired Dev


Joined: 02 Apr 2009
Posts: 345
Location: Warsaw, PL

PostPosted: Mon Aug 02, 2010 7:54 pm    Post subject: Reply with quote

Thanks aderesch it seems to work.
Back to top
View user's profile Send private message
Dagger
Retired Dev
Retired Dev


Joined: 11 Jun 2003
Posts: 765
Location: UK

PostPosted: Wed Aug 04, 2010 10:34 am    Post subject: Reply with quote

With NM-0.8.1 you can try Gentoo system plugin. It will read your current Gentoo config and honor all your settings.

Configuration

Edit /etc/NetworkManager/nm-system-settings.conf and make it looks like:

Code:

[main]
plugins=ifnet,keyfile

[ifnet]
managed=true
auto_refresh=false


PS what's crashing in 0.8 for you? If package is crashing, please file a bug report.
_________________
95% of all computer errors occur between chair and keyboard (TM)
Join the FSF as an Associate Member!
Post under CC license.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum