theforeman/foreman — pull request #376 by frimik (2013-01-16 01:07:29+00:00)
Title: fixes #2130 - normalize_hostname appends domain to fqdn

Ok, let me know if it makes sense - we assume otherwise that hostnames are RFC952 , right? Ie, dot (.) is only allowed as delimiter between domain components.

Commit description:

When the domain part of $fqdn doesn't match $domain, the normalize_hostname
function would append $domain onto the end of $fqdn, saving the host as
$fqdn.$domain (Example: hostname.domain1.com.domain2.com).