Agent/OS/MacOS/Slots.pm
Dmidecode does not exist n Mac computers. This module is migrated to MacOS directory and it returns results through system_profiler from the type SPPCIDataType. The returned information displayes the occupied ports.
Blueprint information
- Status:
- Complete
- Approver:
- mortheres
- Priority:
- Medium
- Drafter:
- None
- Direction:
- Approved
- Assignee:
- Andreas Xenos
- Definition:
- Approved
- Series goal:
- Accepted for stable-2.0
- Implementation:
- Implemented
- Milestone target:
- None
- Started by
- mortheres
- Completed by
- mortheres
Whiteboard
package Ocsinventory:
sub check {
return(undef) unless -r '/usr/sbin/
return (undef) unless can_load(
return 1;
}
sub run {
my $params = shift;
my $common = $params->{common};
# create the profile object and return undef unless we get something back
my $pro = Mac::SysProfile
my $data = $pro->gettype(
return(undef) unless(ref($data) eq 'ARRAY');
foreach my $slot (@$data) {
my ($name, $description, $status) = '';
$name = $slot->{'_name'};
'NAME' => $name,
});
}
}
1;
-------
Hi Andreas,
Thanks a lot for your proposal and code.
It has been implemented in 1091 of the stable-2.0 branch : http://
Kind regards,
--
Guillaume