blob: 3c2d804363cf2e229a660dda3fee0034ac301339 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
$NetBSD: patch-am,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
--- lib/Ocsinventory/Agent/Backend/OS/BSD/Archs/Sparc.pm.orig 2009-07-30 15:47:09.000000000 +0200
+++ lib/Ocsinventory/Agent/Backend/OS/BSD/Archs/Sparc.pm 2009-07-30 15:54:21.000000000 +0200
@@ -52,9 +52,11 @@
# c) FreeBSD
# cpu0: Sun Microsystems UltraSparc-I Processor (167.00 MHz CPU)
- for (`dmesg`) {
- if (/^mainbus0 \(root\):\s*(.*)$/) { $SystemModel = $1; }
- if (/^cpu[^:]*:\s*(.*)$/i) { $processort = $1 unless $processort; }
+ if ( -r "/var/run/dmesg.boot") {
+ for(`cat /var/run/dmesg.boot`){
+ if (/^mainbus0 \(root\):\s*(.*)$/) { $SystemModel = $1; }
+ if (/^cpu[^:]*:\s*(.*)$/i) { $processort = $1 unless $processort; }
+ }
}
$SystemModel || chomp ($SystemModel = `sysctl -n hw.model`); # for FreeBSD
$SystemManufacturer = "SUN";
|