BrightcoveOS/Diamond — pull request #158 by Dieterbe (2012-10-17 19:12:27+00:00)
Title: cleanup/bugfix hostname configuration

the commit message should say it all, but for more info:
I was debugging an issue where my hostname would show up as `localhost`, my hostname_method is fqdn_short (default.), and found a bunch of issues with our hostname implementation
```
[dieter@dfvimeostatsd1 ~]$ cat /etc/sysconfig/network
HOSTNAME=dfvimeostatsd1
NETWORKING=yes
GATEWAY=10.90.128.1
[dieter@dfvimeostatsd1 ~]$ cat /etc/hosts
127.0.0.1 dfvimeostatsd1 localhost localhost.localdomain localhost4 localhost4.localdomain4
[dieter@dfvimeostatsd1 ~]$ hostname
dfvimeostatsd1
[dieter@dfvimeostatsd1 ~]$ hostname -s
dfvimeostatsd1
[dieter@dfvimeostatsd1 ~]$ hostname -f
dfvimeostatsd1
[dieter@dfvimeostatsd1 ~]$ hostname --fqdn
dfvimeostatsd1
[dieter@dfvimeostatsd1 ~]$ hostname --all-fqdns
dfvimeostatsd1.df.vimeows.com
[dieter@dfvimeostatsd1 ~]$ hostname --domain
[dieter@dfvimeostatsd1 ~]$ hostname --alias
localhost localhost.localdomain localhost4 localhost4.localdomain4
[dieter@dfvimeostatsd1 ~]$ python2
Python 2.6.6 (r266:84292, Sep 11 2012, 08:34:23)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> import os
>>> socket.getfqdn()
'localhost.localdomain'
>>> socket.gethostbyaddr('127.0.0.1')
('dfvimeostatsd1', ['localhost', 'localhost.localdomain', 'localhost4', 'localhost4.localdomain4'], ['127.0.0.1'])
>>> socket.gethostname()
'dfvimeostatsd1'
>>> os.uname()
('Linux', 'dfvimeostatsd1', '2.6.32-279.9.1.el6.x86_64', '#1 SMP Tue Sep 25 21:43:11 UTC 2012', 'x86_64')
```