From a5a034e6116a9b4a788b57ead89e1149c71df643 Mon Sep 17 00:00:00 2001 From: Tristan PILAT Date: Mon, 27 Apr 2020 15:30:00 +0200 Subject: [PATCH] Add check_uptodate function --- evocheck.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/evocheck.sh b/evocheck.sh index f511449..2591dd8 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -125,6 +125,12 @@ check_evobackup(){ fi } +check_uptodate(){ + if [ -f $(command -v syspatch) ]; then + if syspatch -c | egrep "." 1> /dev/null 2>&1; then + failed "IS_UPTODATE" "Security update available! Update with syspatch(8)!" + fi + fi } check_uptime(){ @@ -296,6 +302,7 @@ main() { test "${IS_TMOUTPROFILE:=1}" = 1 && check_tmoutprofile test "${IS_RAIDOK:=1}" = 1 && check_raidok test "${IS_EVOBACKUP:=1}" = 1 && check_evobackup + test "${IS_UPTODATE:=1}" = 1 && check_uptodate test "${IS_UPTIME:=1}" = 1 && check_uptime test "${IS_BACKUPUPTODATE:=1}" = 1 && check_backuptodate test "${IS_GITPERMS:=1}" = 1 && check_gitperms