Add installation date in the report of the installed software.
Add installation date in the report of the installed software using system_profiler in Packages.pm
Whiteboard
Hi, system_profiler provides the last modified date of an installed package on a Mac.
I propose to set this date as the value for the installation date in the respective table of the ocs database.
-------
package Ocsinventory:
use strict;
use warnings;
sub check {
my $params = shift;
return unless can_load(
# Do not run an package inventory if there is the --nosoft parameter
return if ($params-
1;
}
sub run {
my $params = shift;
my $common = $params->{common};
my $profile = Mac::SysProfile
my $data = $profile-
return unless($data && ref($data) eq 'ARRAY');
# for each app, normalize the information, then add it to the inventory stack
foreach my $app (@$data){
#my $a = $apps->{$app};
my $kind = $app->{
my $comments = '['.$kind.']';
'NAME' => $app->{'_name'},
});
}
}
1;