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
