summaryrefslogtreecommitdiff
path: root/net/ocsinventory-agent/patches/patch-af
blob: 666e9ce9409ea78272ec7673ebb58a5d747afaa0 (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
$NetBSD: patch-af,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/Modems.pm	2009-06-25 18:50:26.000000000 +0200
@@ -0,0 +1,24 @@
+package Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Modems;
+use strict;
+use Ocsinventory::Agent::Backend::OS::BSD::Pcictl::Pcictl;
+
+sub run {
+  my $params = shift;
+  my $inventory = $params->{inventory};
+
+  foreach (runpcictl()) {
+
+    if(/modem/i && /^\S+:\s(.+)\s\(([^,]+)(,.+)?\)$/i) {
+      my $name = $1;
+      my $description = $2;
+
+
+      $inventory->addModems({
+	  'DESCRIPTION'  => $description,
+	  'NAME'          => $name,
+	});
+    }
+  }
+}
+
+1