source: ocsinventory-agent/trunk/fuentes/lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging/BSDpkg.pm @ 468

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

Copyt trusty code

File size: 425 bytes
Line 
1package Ocsinventory::Agent::Backend::OS::Generic::Packaging::BSDpkg;
2
3sub check {can_run("pkg_info")}
4
5sub run {
6  my $params = shift;
7  my $common = $params->{common};
8
9  foreach(`pkg_info`){
10      /^(\S+)-(\d+\S*)\s+(.*)/;
11      my $name = $1;
12      my $version = $2;
13      my $comments = $3;
14     
15      $common->addSoftware({
16          'COMMENTS' => $comments,
17          'NAME' => $name,
18          'VERSION' => $version
19      });
20  }
21}
22
231;
Note: See TracBrowser for help on using the repository browser.