From 48561592eefc2ec5241304897f7c7bf1c401ab3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S?= Date: Wed, 16 Jan 2019 14:12:12 +0100 Subject: [PATCH] Replace and condition by or condition Check install_date or last_upgrade, because if you never upgraded you will never match the limit --- evocheck.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/evocheck.sh b/evocheck.sh index 0493033..f3a04eb 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -538,7 +538,8 @@ if [ -e /etc/debian_version ]; then else install_date=0 fi - [ $install_date -lt $limit ] && [ $last_upgrade -lt $limit ] && echo 'IS_NOTUPGRADED FAILED!' + # Check install_date or last_upgrade, because if you never upgraded you will never match the limit + ( [ $install_date -lt $limit ] || [ $last_upgrade -lt $limit ] ) && echo 'IS_NOTUPGRADED FAILED!' fi # Check if reserved blocks for root is at least 5% on every mounted partitions.