From e4755a4e16d5759781df5b98e3dba5a1050a4ea5 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Thu, 27 Jul 2023 13:08:27 +0200 Subject: [PATCH] fs_errors: shell fixes; update help page --- check_fs_errors | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/check_fs_errors b/check_fs_errors index b652f80..6369f4b 100755 --- a/check_fs_errors +++ b/check_fs_errors @@ -10,10 +10,14 @@ # ---------------------------------------------------------------------- # 2021-03-23 v1.0 <axel.hahn@iml.unibe.ch> # 2021-03-30 v1.1 <axel.hahn@iml.unibe.ch> max age of detected errors: since yesterday (commented) +# 2023-07-27 v1.2 <axel.hahn@iml.unibe.ch> shell fixes; update help page # ====================================================================== -. `dirname $0`/inc_pluginfunctions +. $( dirname $0 )/inc_pluginfunctions + +self_APPNAME=$( basename $0 | tr [:lower:] [:upper:] ) +self_APPVERSION=1.2 # ---------------------------------------------------------------------- @@ -21,18 +25,22 @@ # ---------------------------------------------------------------------- function showHelp(){ + _self=$(basename $0) cat <<EOF ______________________________________________________________________ -CHECK_FS_ERRORS check if kernel logs inconsistency messages +$self_APPNAME +v$self_APPVERSION (c) Institute for Medical Education - University of Bern Licence: GNU GPL 3 ______________________________________________________________________ +Check if kernel logs inconsistency messages in the journallog. +It requires sudo permission on /bin/journalctl SYNTAX: -`basename $0` [-h] +$_self [-h] OPTIONS: @@ -43,7 +51,7 @@ PARAMETERS: none EXAMPLE: -`basename $0` +$_self EOF } @@ -76,7 +84,7 @@ test ! -z "$out" && ph.setStatus "critical" # ----- OUTPUT ph.status "check if kernel logs inconsistency messages" -echo $out +echo "$out" # ----- CLEANUP AND BYE! -- GitLab