From 11d77659a08634c604432814b256c6dac7efbc06 Mon Sep 17 00:00:00 2001 From: Jeremy Dubois Date: Thu, 7 Oct 2021 15:01:48 +0200 Subject: [PATCH] Fixed check_tmoutprofile : syntax error on if/else/fi test --- CHANGELOG | 6 ++++++ evocheck.sh | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index cf4955b..2b8702d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [21.10] - 2021-10-07 + +### Fixed + +- Fixed check_tmoutprofile : syntax error on if/else/fi test + ## [21.09] - 2021-09-17 ### Changed diff --git a/evocheck.sh b/evocheck.sh index a0853d1..2e578e1 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -3,7 +3,7 @@ # EvoCheck # Script to verify compliance of an OpenBSD server powered by Evolix -readonly VERSION="21.09" +readonly VERSION="21.10" # Disable LANG* @@ -114,7 +114,7 @@ check_noatime(){ } check_tmoutprofile(){ - if [ -f /etc/skel/.profile ] + if [ -f /etc/skel/.profile ]; then grep -q TMOUT= /etc/skel/.profile /root/.profile || failed "IS_TMOUTPROFILE" "In order to fix, add 'export TMOUT=36000' to both /etc/skel/.profile and /root/.profile files" else failed "IS_TMOUTPROFILE" "File /etc/skel/.profile does not exist. Both /etc/skel/.profile and /root/.profile should contain at least 'export TMOUT=36000'"