Fix setting /etc/hostname to not be FQDN
According to hosts(5), the first word after the IP address in an
/etc/hosts entry should be an FQDN.
On the other hand, according to hostname(1), the contents of
/etc/hostname should NOT be an FQDN (but just the part before the dot).
However they are both taken from the --hostname parameter of vzctl.
Fix that by removing the part after the first dot when setting /etc/hostname
Initial bug report, patch and (most of) the above description
by Marcin Owsiany <marcin@owsiany.pl>
http://bugzilla.openvz.org/1087
5 files changed