summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2011-03-21 11:18:07 -0400
committerTodd Zullinger <tmz@pobox.com>2011-03-21 11:18:07 -0400
commitdef33221bd7f20315205e9d63abe4ae8ece00f5e (patch)
treecc6bf70587fbd2293257aa3bbdf383c74b32c415 /lib
parentb82635b143579b280121215d26cd634e87b76497 (diff)
downloadfacter-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')
-rw-r--r--lib/facter/util/xendomains.rb2
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