OCSInventory-NG / UnixAgent

This is the OCS unified agent for Unix operating systems
http://www.ocsinventory-ng.org/en/
GNU General Public License v2.0
89 stars 84 forks source link

RedHat 9 Repository is empty #437

Closed thfiliol1 closed 1 year ago

thfiliol1 commented 1 year ago

It's hard to solve a problem when important details are missing, that why we added this template, to help you and us.

General informations

Operating system : Redhat 9 Perl version :

OCS Inventory informations

Unix agent version : OCS-NG_unified_unix_agent_v2.10.0

Problem's description

image Repository section is empty

In Redhat 9 when you perform the command (dnf..) we have this output: image "Repo-filename[space]: ....

In Redhat 7 when you perform the command (dnf..) now we have this output: image "Repo-filename[no space]: ....

so in UnixAgent/Rhel.pm Please modify the code with this regex: $repo_name=$1 if ($line =~ /^Repo-name\s+:\s(.)/i); $repo_baseurl=$1 if ($line =~ /^Repo-baseurl\s+:\s(.)/i); this line --> $repo_filename=$1 if ($line =~ /^Repo-filename\s:\s(.)/i); <-- $repo_pkgs=$1 if ($line =~ /^Repo-pkgs\s+:\s(.)/i); $repo_rev=$1 if ($line =~ /^Repo-revision\s+:\s(.)/i); $repo_size=$1 if ($line =~ /^Repo-size\s+:\s(.)/i); $repo_expire=$1 if ($line =~ /^Repo-expire\s+:\s(.)/i); $repo_updated=$1 if ($line =~ /^Repo-updated\s+:\s(.)/i); $repo_lastupdated=$1 if ($line =~ /Updated\s+:\s(.)/i); $repo_mirrors=$1 if ($line =~ /^Repo-metalink\s+:\s(.*)/i);

fbomj commented 1 year ago

Fix by #440