source: ocsinventory-agent/trunk/fuentes/lib/Ocsinventory/Agent/Backend/OS/AIX/Modems.pm @ 468

Last change on this file since 468 was 468, checked in by mabarracus, 4 years ago

Copyt trusty code

File size: 414 bytes
Line 
1package Ocsinventory::Agent::Backend::OS::AIX::Modems;
2use strict;
3
4sub check {can_run("lsdev")}
5
6sub run {
7  my $params = shift;
8  my $common = $params->{common};
9
10  for(`lsdev -Cc adapter -F 'name:type:description'`){
11    if(/modem/i && /\d+\s(.+):(.+)$/){
12          my $name = $1;
13          my $description = $2;
14          $common->addModems({
15                'DESCRIPTION'  => $description,
16                'NAME'          => $name,
17          });
18    }
19  }
20}
21
221
Note: See TracBrowser for help on using the repository browser.