Skip to content
This repository was archived by the owner on Oct 6, 2022. It is now read-only.

Commit 0cb8482

Browse files
committed
fix: check debian linux version in /etc/debian_version
Closes fusioninventory#723
1 parent 600666f commit 0cb8482

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Changes

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ inventory:
4343
* linux: provides debian installed software filesize in bytes
4444
* linux: Added support for installed softwares by Snap
4545
* linux: double-check a network interface is not virtual
46+
* fix #723: check debian linux version in /etc/debian_version
4647

4748
netdiscovery/netinventory:
4849
* linux: avoid to share HTTP client with threads to fix RHEL/CentOS 7 crash

lib/FusionInventory/Agent/Task/Inventory/Linux/Distro/OSRelease.pm

+8
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ sub doInventory {
3030
OSNAME => $description,
3131
});
3232

33+
# Handle Debian case where version is not complete like in Ubuntu
34+
# by checking /etc/debian_version
35+
if (-r '/etc/debian_version') {
36+
my $debian_version = getFirstLine(file => '/etc/debian_version');
37+
$version = $debian_version
38+
if $debian_version && $debian_version =~ /^\d/;
39+
}
40+
3341
$inventory->setOperatingSystem({
3442
NAME => $name,
3543
VERSION => $version,

0 commit comments

Comments
 (0)