While the command 'hostname' returns the correct fully qualified name 'hostname -s' always returns 'localhost' as its answer
This isn't a bug. The behavior depends on how your name service is set up. Check your /etc/hosts. FWIW, on my sparc64 named krusty.devel.redhat.com, hostname -s returns krusty. My one-line /etc/hosts looks like 127.0.0.1 localhost and my /etc/nsswitch.conf has ... hosts: files nisplus nis dns