diff options
author | Todd Zullinger <tmz@pobox.com> | 2011-03-21 11:18:07 -0400 |
---|---|---|
committer | Todd Zullinger <tmz@pobox.com> | 2011-03-21 11:18:07 -0400 |
commit | def33221bd7f20315205e9d63abe4ae8ece00f5e (patch) | |
tree | cc6bf70587fbd2293257aa3bbdf383c74b32c415 /lib/facter/util/xendomains.rb | |
parent | b82635b143579b280121215d26cd634e87b76497 (diff) | |
download | facter-def33221bd7f20315205e9d63abe4ae8ece00f5e.tar.gz facter-def33221bd7f20315205e9d63abe4ae8ece00f5e.tar.xz facter-def33221bd7f20315205e9d63abe4ae8ece00f5e.zip |
(#6795) xendomains: Ignore error output from xm list
If xend is not running, xm list writes to stderr and facter propagates
this to the user. Redirect stderr to /dev/null.
Diffstat (limited to 'lib/facter/util/xendomains.rb')
-rw-r--r-- | lib/facter/util/xendomains.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/facter/util/xendomains.rb b/lib/facter/util/xendomains.rb index 4f590a8..6b0d403 100644 --- a/lib/facter/util/xendomains.rb +++ b/lib/facter/util/xendomains.rb @@ -2,7 +2,7 @@ # module Facter::Util::Xendomains def self.get_domains - if xm_list = Facter::Util::Resolution.exec('/usr/sbin/xm list') + if xm_list = Facter::Util::Resolution.exec('/usr/sbin/xm list 2>/dev/null') domains = xm_list.split("\n").reject { |line| line =~ /^(Name|Domain-0)/ } domains.map { |line| line.split(/\s/)[0] }.join(',') end |