diff --git a/CHANGELOG.md b/CHANGELOG.md index 16bba5df..bf55d9af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ The **patch** part changes is incremented if multiple releases happen the same m ### Changed -* evocheck: upstream release 21.10.2 +* evocheck: upstream release 21.10.3 * evolinux-users + nagios-nrpe: Add support for php-fpm80 in lxc * mongodb: Deny the install on Debian 11 « Bullseye » when the version is unsupported * mongodb: Support version 5.0 (for buster) diff --git a/evocheck/files/evocheck.sh b/evocheck/files/evocheck.sh index 8a5719a8..b2aa4138 100644 --- a/evocheck/files/evocheck.sh +++ b/evocheck/files/evocheck.sh @@ -4,7 +4,7 @@ # Script to verify compliance of a Debian/OpenBSD server # powered by Evolix -VERSION="21.10.2" +VERSION="21.10.3" readonly VERSION # base functions @@ -1412,8 +1412,11 @@ get_version() { # /path/to/my_command --get-version # ;; + add-vm) + grep '^VERSION=' "${command}" | head -1 | cut -d '=' -f 2 + ;; ## Let's try the --version flag before falling back to grep for the constant - kvmstats | add-vm) + kvmstats) if ${command} --version > /dev/null 2> /dev/null; then ${command} --version 2> /dev/null | head -1 | cut -d ' ' -f 3 else @@ -1439,7 +1442,9 @@ check_version() { if [ -z "${actual_version}" ]; then failed "IS_VERSIONS_CHECK" "failed to lookup actual version of ${program}" elif dpkg --compare-versions "${actual_version}" lt "${expected_version}"; then - failed "IS_VERSIONS_CHECK" "${program} version ${expected_version} expected, but ${actual_version} found" + failed "IS_VERSIONS_CHECK" "${program} version ${actual_version} is older than expected version ${expected_version}" + elif dpkg --compare-versions "${actual_version}" gt "${expected_version}"; then + failed "IS_VERSIONS_CHECK" "${program} version ${actual_version} is newer than expected version ${expected_version}, you should update tour index." else : # Version check OK fi