Commits
Kir Kolyshkin authored 2bcfc6dbdb9
vzctl set --hostname: back to FQDN for Red Hat and Slackware Commit 57bfaa5a61064 was a bit radical in that it removed the FQDN from all of the places. As many people pointed out, Red Hat's /etc/sysconfig/network is expected to have HOSTNAME= value to be FQDN, for example, see [1]. Fix that by reverting a hunk in the above commit. While at it, I have checked if the issue is valid for other distros: 1. Gentoo: /etc/conf.d/hostname should be hostname-only [2]. 2. Debian: /etc/hostname should only contain hostname itself, "do not specify a fully qualified hostname that includes the domain name" [3]. 3. Slackware: slackbook.org tells nothing about /etc/hostname; according to some non-reliable sources like [4], its scripts take care of stripping the FQDN from /etc/HOSTNAME then needed, so revert the patch for Slackware as well. 4. suse/SLES: according to [5], /etc/HOSTNAME "contains the hostname without the domain name attached". Other sources (like [6]) says it should be FQDN. Let's leave as it is for now. http://bugzilla.openvz.org/1087 [1] http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/en-US/Reference_Guide/s2-sysconfig-network.html [2] http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=8 [3] http://oreilly.com/catalog/debian/chapter/book/ch10_02.html [4] http://www.linuxquestions.org/questions/slackware-14/why-does-slackware-hostname-605440/ [5] http://www.linuxtopia.org/online_books/suse_linux_guides/SLES10/suse_enterprise_linux_server_installation_admin/sec_basicnet_manconf.html [6] http://blog.doingitwithlinux.com/2008/07/slessuse-host-name-change.html Reported-by: Jon Gartner <aqua910@hotmail.com> Reported-by: Chris Butler <chrisb@zedcore.com> Signed-off-by: Kir Kolyshkin <kir@openvz.org>