xenserver / xe-guest-utilities

XenServer guest utilities for unix-like operating systems
BSD 2-Clause "Simplified" License
59 stars 58 forks source link

Debian minor version wrongly identified #125

Open ydirson opened 2 years ago

ydirson commented 2 years ago

A Debian 11.2 is reported as 11.11:

$ cat /etc/debian_version 
11.2

$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

$ ./xe-linux-distribution 
os_distro="debian"
os_majorver="11"
os_minorver="11"
os_uname="5.10.0-11-amd64"
os_name="Debian GNU/Linux 11 (bullseye)"

The awk expression in identify_lsb assumes there is a dot in the lsb_release --short --release output, which is not the case here. It should likely conclude that minor="" instead, in this case.