Please review pull request #177: Ticket/1.6.x/12813 redirect lspci stderr opened by (adrienthebo)
Description:
On linode instances, or any instance without a working /proc/bus/pci,
the following output is produced on stderr:
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.
This is very noisy over time, and does not produce anything of value.
Redirecting it to /dev/null removes the issue.
- Opened: Fri Feb 24 21:11:42 UTC 2012
- Based on: puppetlabs:1.6.x (4adc7ac677c7bead669c78d16885a3bf72ceb195)
- Requested merge: adrienthebo:ticket/1.6.x/12813-redirect_lspci_stderr (a3930ddc4e1281bc15482b8e2864baa8c1a34a0f)
Diff follows:
diff --git a/lib/facter/virtual.rb b/lib/facter/virtual.rb
index 1ee41f9..ea9e1bd 100644
--- a/lib/facter/virtual.rb
+++ b/lib/facter/virtual.rb
@@ -89,7 +89,7 @@
end
if result == "physical"
- output = Facter::Util::Resolution.exec('lspci')
+ output = Facter::Util::Resolution.exec('lspci 2>/dev/null')
if not output.nil?
output.each_line do |p|
# --- look for the vmware video card to determine if it is virtual => vmware.
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
