mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
lsb-release to native /etc/*ease
This commit is contained in:
parent
458fd92955
commit
609609c0ea
@ -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*/);
|
||||
|
@ -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*/);
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user