Skip to content

Commit

Permalink
fix: Fix --partial option when used with glpi-agent script
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bougard committed Dec 11, 2024
1 parent 999066d commit cfc50ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ inventory:
- Remove check alerting on invalid storage interface for GLPI >= 10.0.4
* fix #811: Fix network interface inventory on lxc linux container, but also fix
few other cases where more interfaces are found due to interface name aliasing
* Fix --partial option when used with glpi-agent script

remoteinventory:
* Store remote inventory part checksums in dedicated state files and support maintenance
Expand Down
5 changes: 3 additions & 2 deletions bin/glpi-agent
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use Getopt::Long;
use Pod::Usage;

use GLPI::Agent;
use GLPI::Agent::Event;

Getopt::Long::Configure( "no_ignorecase" );

Expand Down Expand Up @@ -194,12 +195,12 @@ if ($options->{'set-forcerun'}) {
if ($options->{partial}) {
die "--partial option not compatible with --daemon\n"
if $options->{daemon};
$agent->{event} = {
$agent->{event} = GLPI::Agent::Event->new(
name => "partial inventory",
task => "inventory",
partial => 1,
category => $options->{partial},
};
);
}

if ($options->{credentials}) {
Expand Down

0 comments on commit cfc50ec

Please sign in to comment.