diff --git a/pandora_agents/pc/pandora_agent b/pandora_agents/pc/pandora_agent index b105a8c654..c5437d2225 100644 --- a/pandora_agents/pc/pandora_agent +++ b/pandora_agents/pc/pandora_agent @@ -1141,7 +1141,7 @@ sub guess_os_version { # Linux if ($os eq 'linux') { - $os_version = `lsb_release -sd 2>$DevNull`; + $os_version = `cat /etc/*ease|grep PRETTY| cut -f 2 -d= | tr -d '"' 2>$DevNull`; # AIX } elsif ($os eq 'aix') { $os_version = "$2.$1" if (`uname -rv` =~ /\s*(\d)\s+(\d)\s*/); diff --git a/pandora_agents/unix/pandora_agent b/pandora_agents/unix/pandora_agent index 631d134add..19f6a16d7b 100755 --- a/pandora_agents/unix/pandora_agent +++ b/pandora_agents/unix/pandora_agent @@ -2736,7 +2736,7 @@ sub guess_os_version ($) { # Linux if ($os eq 'linux') { - $os_version = `lsb_release -sd 2>$DevNull`; + $os_version = `cat /etc/*ease|grep PRETTY| cut -f 2 -d= | tr -d '"' 2>$DevNull`; # AIX } elsif ($os eq 'aix') { $os_version = "$2.$1" if (`uname -rv` =~ /\s*(\d)\s+(\d)\s*/); diff --git a/pandora_server/lib/PandoraFMS/Tools.pm b/pandora_server/lib/PandoraFMS/Tools.pm index 734170b0ff..8a72170a3b 100755 --- a/pandora_server/lib/PandoraFMS/Tools.pm +++ b/pandora_server/lib/PandoraFMS/Tools.pm @@ -237,7 +237,7 @@ our $OS = $^O; our $OS_VERSION = "unknown"; our $DEVNULL = '/dev/null'; if ($OS eq 'linux') { - $OS_VERSION = `lsb_release -sd 2>/dev/null`; + $OS_VERSION = `cat /etc/*ease|grep PRETTY| cut -f 2 -d= | tr -d '"' 2>/dev/null`; } elsif ($OS eq 'aix') { $OS_VERSION = "$2.$1" if (`uname -rv` =~ /\s*(\d)\s+(\d)\s*/); } elsif ($OS =~ /win/i) {