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:

10.32.112.220	nbecker1	# Added by NetworkManager
127.0.0.1	localhost.localdomain	localhost
::1	nbecker1	localhost6.localdomain6	localhost6

Now DNS is set correctly:
host nbecker1
nbecker1.hughes.com has address 10.32.112.220

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]: '127.0.0.1'

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]