Use pcidump istead of lspci to determine if we are running

inside of vmware.
This commit is contained in:
robert 2011-03-09 11:24:14 +00:00
parent 9124dca4c6
commit f393d3f55e
2 changed files with 18 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.16 2010/11/24 21:35:15 jeremy Exp $
# $OpenBSD: Makefile,v 1.17 2011/03/09 11:24:14 robert Exp $
SHARED_ONLY= Yes
@ -7,7 +7,7 @@ COMMENT= Ruby library for retrieving facts from operating systems
VERSION= 1.5.8
DISTNAME= facter-${VERSION}
PKGNAME= ruby-${DISTNAME}
REVISION = 2
REVISION = 3
CATEGORIES= sysutils
HOMEPAGE= http://reductivelabs.com/projects/facter/

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-lib_facter_virtual_rb,v 1.1 2011/03/09 11:24:14 robert Exp $
--- lib/facter/virtual.rb.orig Wed Mar 9 11:34:13 2011
+++ lib/facter/virtual.rb Wed Mar 9 12:23:04 2011
@@ -43,7 +43,11 @@ Facter.add("virtual") do
end
if result == "physical"
- output = Facter::Util::Resolution.exec('lspci')
+ if Facter.value(:kernel) == "OpenBSD"
+ output = Facter::Util::Resolution.exec('pcidump')
+ else
+ output = Facter::Util::Resolution.exec('lspci')
+ end
if not output.nil?
output.each_line do |p|
# --- look for the vmware video card to determine if it is virtual => vmware.