Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/thread-self/root/usr/share/perl5/vendor_perl/Ocsinventory/Agent/Backend/OS/AIX/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/thread-self/root/usr/share/perl5/vendor_perl/Ocsinventory/Agent/Backend/OS/AIX/Software.pm
package Ocsinventory::Agent::Backend::OS::AIX::Software;

use strict;
use warnings;

sub check {
    my $params = shift;
    my $common = $params->{common};

    # Do not run an package inventory if there is the --nosoftware parameter
    return if ($params->{config}->{nosoftware});

    return unless $common->can_run("lslpp");
    1;
}

sub run {
    my $params = shift;
    my $common = $params->{common};

    my @list;
    my $buff;
    foreach (`lslpp -c -l`) {
        my @entry = split /:/,$_;
        next unless (@entry);
        next unless ($entry[1]);
        next if $entry[1] =~ /^device/;

        $common->addSoftware({
            'COMMENTS' => $entry[6],
            'FOLDER'   => $entry[0],
            'NAME'     => $entry[1],
            'VERSION'  => $entry[2],
        });
    }
}

1;

Hry