Use pcidump istead of lspci to determine if we are running
inside of vmware.
This commit is contained in:
parent
9124dca4c6
commit
f393d3f55e
@ -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/
|
||||
|
16
sysutils/ruby-facter/patches/patch-lib_facter_virtual_rb
Normal file
16
sysutils/ruby-facter/patches/patch-lib_facter_virtual_rb
Normal 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.
|
Loading…
x
Reference in New Issue
Block a user