On Mon, 21 Mar 2011 11:15:24 -0700, Markus Roberts wrote: > > On Mon, Mar 21, 2011 at 8:23 AM, Todd Zullinger <t...@pobox.com> wrote: > > > If xend is not running, xm list writes to stderr and facter propagates > > this to the user. Redirect stderr to /dev/null. > > --- > > 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 > > -- > > 1.7.4.1 > > > > +1 > > Assuming that there is no output on stdout in the error case, it appears > that this will return nil, just as if xm had not been present. > > -- M
The change looked good to both Daniel and I, too. I've merged it into next as of 330d3992744b80187223e5b6af2a58219e4610f6. Thanks, Todd! -- Jacob Helwig
signature.asc
Description: Digital signature