get nm to set hostname to fqdn

I have my hostname set to a short name, because this is a laptop and will 
move to different domains.

In /etc/hosts, I see:	nbecker1	# Added by NetworkManager	localhost.localdomain	localhost
::1	nbecker1	localhost6.localdomain6	localhost6

Now DNS is set correctly:
host nbecker1 has address

But this setup is causing me problems.  In python:
In [2]: import socket

In [3]: socket.gethostname()
Out[3]: 'nbecker1'

In [4]: socket.gethostbyname(socket.gethostname())
Out[4]: ''

Is there some way that nm can set my hostname to FQDN?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]