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

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

Copyt trusty code

File size: 637 bytes
RevLine 
[468]1package Ocsinventory::Agent::Backend::OS::MacOS::Sound;
2use strict;
3
4
5sub check {
6    return(undef) unless -r '/usr/sbin/system_profiler'; # check perms
7    return 1;
8}
9
10sub run {
11    my $params = shift;
12    my $common = $params->{common};
13
14    # create profiler obj, bail if datatype fails
15    my $data = $common->get_sysprofile_devices_names('SPAudioDataType');
16
17    return(undef) unless(ref($data) eq 'ARRAY');
18
19    # add sound cards
20    foreach my $sound (@$data){
21        $common->addSound({
22            'NAME'          => $sound,
23            'MANUFACTURER'  => $sound,
24            'DESCRIPTION'   => $sound,
25        });
26    }
27}
281;
Note: See TracBrowser for help on using the repository browser.