blob: 6e050bbe78dce0225eb4d8869f9f7ae233746b83 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
$NetBSD: patch-ad,v 1.1.1.1 2009/08/16 18:25:53 bouyer Exp $
--- /dev/null 2009-06-25 18:52:46.000000000 +0200
+++ ./lib/Ocsinventory/Agent/Backend/OS/BSD/Pcictl/Controllers.pm 2009-06-25 18:50:23.000000000 +0200
@@ -0,0 +1,26 @@
+package Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Controllers;
+use strict;
+use Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Pcictl;
+
+sub run {
+ my $params = shift;
+ my $inventory = $params->{inventory};
+
+ foreach (runpcictl()) {
+ if ($_ =~ m/^\S+:\s(.+)\s\(([^,]+)(,.+)?\)$/i) {
+ my $name = $1;
+ my $manufacturer = "";
+ my $type = $2;
+ $manufacturer =~ s/\ *$//; # clean up the end of the string
+
+ $inventory->addController({
+ 'NAME' => $name,
+ 'MANUFACTURER' => $manufacturer,
+ 'TYPE' => $type,
+ });
+ }
+ }
+
+}
+
+1
|