puppetlabs/facter — pull request #445 by zaphod42 (2013-05-28 23:41:55+00:00)
Title: (#20938) Ignore stderr from domain commands

Previously, when the hostname of a system is in a messed up stated, the
hostname and dnsdomainname commands would output warning messages to
stderr. The facter command execution system does not capture this, and
so the stderr output ends up making it all the way out to the caller and
likely to the user, as is the case for puppet when using facter.

This commit takes the simple approach of redirecting the error output to
/dev/null, which should be sufficient for the platforms that use these
commands (non-windows).