Skip to content

Commit

Permalink
fix: Nolog option for megacli util
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bougard committed Feb 21, 2022
1 parent 76a4eb9 commit 8619b50
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ core:
inventory:
* Use uts.name for Proxmox lxc containers
* Support customized AnyDesk client as remote management inventory on unix/linux
* Backport of @xo4yecTb patch: NoLog option for megacli util fusioninventory/fusioninventory-agent#996

collect:
* Make collect task more verbose when debug is enabled
Expand Down
6 changes: 3 additions & 3 deletions lib/GLPI/Agent/Task/Inventory/Linux/Storages/Megacli.pm
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ sub _getStorages {
sub _getAdpEnclosure {
my (%params) = @_;

my $command = exists $params{adp} ? "megacli -EncInfo -a$params{adp}" : undef;
my $command = exists $params{adp} ? "megacli -EncInfo -a$params{adp} -NoLog" : undef;

my $handle = getFileHandle(
command => $command,
Expand Down Expand Up @@ -147,7 +147,7 @@ sub _getAdpEnclosure {
sub _getSummary {
my (%params) = @_;

my $command = exists $params{adp} ? "megacli -ShowSummary -a$params{adp}" : undef;
my $command = exists $params{adp} ? "megacli -ShowSummary -a$params{adp} -NoLog" : undef;

my $handle = getFileHandle(
command => $command,
Expand Down Expand Up @@ -198,7 +198,7 @@ sub _getSummary {
sub _getPDlist {
my (%params) = @_;

my $command = exists $params{adp} ? "megacli -PDlist -a$params{adp}" : undef;
my $command = exists $params{adp} ? "megacli -PDlist -a$params{adp} -NoLog" : undef;

my $handle = getFileHandle(
command => $command,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ sub doInventory {
sub _getPDlist {
my (%params) = @_;

$params{command} = defined $params{adp} ? "megacli -pdlist -a$params{adp}" : undef;
$params{command} = defined $params{adp} ? "megacli -pdlist -a$params{adp} -NoLog" : undef;

my %pdlist;
my $src = {};
Expand All @@ -87,7 +87,7 @@ sub _getPDlist {
sub _getLDinfo {
my (%params) = @_;

$params{command} = defined $params{adp} ? "megacli -ldinfo -lAll -a$params{adp}" : undef;
$params{command} = defined $params{adp} ? "megacli -ldinfo -lAll -a$params{adp} -NoLog" : undef;

my %ldinfo;
my $n = -1;
Expand All @@ -109,7 +109,7 @@ sub _getLDinfo {
sub _getAdpPciInfo {
my (%params) = @_;

$params{command} = defined $params{adp} ? "megacli -AdpGetPciInfo -a$params{adp}" : undef;
$params{command} = defined $params{adp} ? "megacli -AdpGetPciInfo -a$params{adp} -NoLog" : undef;

my %adpinfo;
foreach my $line (getAllLines(%params)) {
Expand Down

0 comments on commit 8619b50

Please sign in to comment.