From 5ec4cd6fff2390cf365714f7d7b8d903d05068fd Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Tue, 4 May 2021 09:17:20 +0200 Subject: [PATCH] meta-data and shellcheck fixes --- evocheck.sh | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/evocheck.sh b/evocheck.sh index e7434c6..808beef 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -4,7 +4,8 @@ # Script to verify compliance of a Debian/OpenBSD server # powered by Evolix -readonly VERSION="21.05-pre1" +VERSION="21.05-pre2" +readonly VERSION # base functions @@ -12,7 +13,7 @@ show_version() { cat <, +Copyright 2009-2021 Evolix , Romain Dessort , Benoit Série , Gregory Colpart , @@ -813,7 +814,7 @@ check_apache2evolinuxconf() { fi } check_backportsconf() { - if is_debian_stretch || is_debian_ || is_debian_bullseye; then + if is_debian_stretch || is_debian_buster || is_debian_bullseye; then grep -qsE "^[^#].*backports" /etc/apt/sources.list \ && failed "IS_BACKPORTSCONF" "backports can't be in main sources list" if grep -qsE "^[^#].*backports" /etc/apt/sources.list.d/*.list; then @@ -958,6 +959,7 @@ check_elastic_backup() { fi } check_mariadbsystemdunit() { + # TODO: check if it is still needed for bullseye if is_debian_stretch || is_debian_buster; then if is_installed mariadb-server; then if systemctl -q is-active mariadb.service; then @@ -1564,10 +1566,13 @@ main() { exit ${RC} } +PROGNAME=$(basename "$0") # shellcheck disable=SC2034 -readonly PROGNAME=$(basename "$0") -# shellcheck disable=2124 -readonly ARGS=$@ +readonly PROGNAME + +# shellcheck disable=SC2124 +ARGS=$@ +readonly ARGS # Disable LANG* export LANG=C