Make the 'processor' fact consistent with other operating systems.
This commit is contained in:
parent
c09bc495b5
commit
c41fd16fbd
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.54 2014/04/17 18:12:09 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.55 2014/05/02 18:36:55 jasper Exp $
|
||||
|
||||
COMMENT= Ruby library for retrieving facts from operating systems
|
||||
|
||||
VERSION= 2.0.1
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
|
||||
DISTNAME= facter-${VERSION}
|
||||
CATEGORIES= sysutils
|
||||
|
38
sysutils/ruby-facter/patches/patch-lib_facter_processor_rb
Normal file
38
sysutils/ruby-facter/patches/patch-lib_facter_processor_rb
Normal file
@ -0,0 +1,38 @@
|
||||
$OpenBSD: patch-lib_facter_processor_rb,v 1.1 2014/05/02 18:36:55 jasper Exp $
|
||||
|
||||
Make the 'processor' fact consistent with other operating systems.
|
||||
|
||||
--- lib/facter/processor.rb.orig Fri May 2 22:33:29 2014
|
||||
+++ lib/facter/processor.rb Fri May 2 22:33:47 2014
|
||||
@@ -7,8 +7,8 @@
|
||||
# On Linux and kFreeBSD, parse '/proc/cpuinfo' for each processor.
|
||||
# On AIX, parse the output of 'lsdev' for its processor section.
|
||||
# On Solaris, parse the output of 'kstat' for each processor.
|
||||
-# On OpenBSD, use 'uname -p' and the sysctl variable for 'hw.ncpu' for CPU
|
||||
-# count.
|
||||
+# On OpenBSD, use the sysctl variables 'hw.model' and 'hw.ncpu'
|
||||
+# for the CPU model and the CPU count respectively.
|
||||
#
|
||||
# Caveats:
|
||||
#
|
||||
@@ -88,11 +88,6 @@ Facter.add("ProcessorCount") do
|
||||
end
|
||||
end
|
||||
|
||||
-Facter.add("Processor") do
|
||||
- confine :kernel => :openbsd
|
||||
- setcode "uname -p"
|
||||
-end
|
||||
-
|
||||
Facter.add("ProcessorCount") do
|
||||
confine :kernel => :Darwin
|
||||
setcode "sysctl -n hw.ncpu"
|
||||
@@ -137,7 +132,7 @@ if Facter.value(:kernel) == "windows"
|
||||
end
|
||||
|
||||
Facter.add("Processor") do
|
||||
- confine :kernel => [:dragonfly,:freebsd]
|
||||
+ confine :kernel => [:dragonfly,:freebsd,:openbsd]
|
||||
setcode "sysctl -n hw.model"
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user