Hello , the current implementation of the parse_os_info-function in os_linux.cpp gets the last line of a Linux-distro related file to
provide a meaningful OS version string.
However the information provided currently on SuSE Linux (SLES) is not very descriptive, it currently uses /etc/lsb-release and gives :
more /etc/lsb-release
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"
So I suggest to use /etc/SuSE-release instead, which gives a good information for
SLES 9 - 12 in the ***first line*** of /etc/SuSE-release :
Example SLES11 :
more /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3
(this is similar to using /etc/redhat-release on Red Hat with the difference that the ***first line*** has the relevant info).
Additionally, /etc/os-release needs some special handling as well, because
the meaningful OS-release description string is not always the last line of the file but in the line
containing the information PRETTY_NAME=...
See also :
https://www.freedesktop.org/software/systemd/man/os-release.html
Example from Ubuntu 14 :
$ more /etc/os-release
...
PRETTY_NAME="Ubuntu 14.04.3 LTS"
...
It might also be a good idea to place /etc/os-release higher in the distro_files list, but I do not have access to
turbolinux / gentoo to check the situation on these distros.
Regards, Matthias
provide a meaningful OS version string.
However the information provided currently on SuSE Linux (SLES) is not very descriptive, it currently uses /etc/lsb-release and gives :
more /etc/lsb-release
LSB_VERSION="core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64"
So I suggest to use /etc/SuSE-release instead, which gives a good information for
SLES 9 - 12 in the ***first line*** of /etc/SuSE-release :
Example SLES11 :
more /etc/SuSE-release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3
(this is similar to using /etc/redhat-release on Red Hat with the difference that the ***first line*** has the relevant info).
Additionally, /etc/os-release needs some special handling as well, because
the meaningful OS-release description string is not always the last line of the file but in the line
containing the information PRETTY_NAME=...
See also :
https://www.freedesktop.org/software/systemd/man/os-release.html
Example from Ubuntu 14 :
$ more /etc/os-release
...
PRETTY_NAME="Ubuntu 14.04.3 LTS"
...
It might also be a good idea to place /etc/os-release higher in the distro_files list, but I do not have access to
turbolinux / gentoo to check the situation on these distros.
Regards, Matthias