Fixed check_tmoutprofile : syntax error on if/else/fi test

This commit is contained in:
Jérémy Dubois 2021-10-07 15:01:48 +02:00
parent f1c63f827f
commit 11d77659a0
2 changed files with 8 additions and 2 deletions

View file

@ -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

View file

@ -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'"