openbsd-ports/sysutils/ruby-facter/patches/patch-lib_facter_virtual_rb
2012-05-05 19:29:49 +00:00

17 lines
691 B
Plaintext

$OpenBSD: patch-lib_facter_virtual_rb,v 1.3 2012/05/05 19:29:49 robert Exp $
--- lib/facter/virtual.rb.orig Sat May 5 21:25:43 2012
+++ lib/facter/virtual.rb Sat May 5 21:26:54 2012
@@ -89,7 +89,11 @@ Facter.add("virtual") do
end
if result == "physical"
- output = Facter::Util::Resolution.exec('lspci 2>/dev/null')
+ if Facter.value(:kernel) == "OpenBSD"
+ output = Facter::Util::Resolution.exec('pcidump 2>/dev/null')
+ else
+ output = Facter::Util::Resolution.exec('lspci 2>/dev/null')
+ end
if not output.nil?
output.each_line do |p|
# --- look for the vmware video card to determine if it is virtual => vmware.