Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2019-07-07 19:47:55 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-07-07 19:47:55 +0300
commit7a816ece8ab503e16250946712a95657155480a8 (patch)
tree45d0648caaeb5493b9edb5dceb3b0d3d0e6d58cc /include
parenta49ea33fea9e6bf6ddcf7bcb7711c7bb79bdf62c (diff)
Added DisplayWarning function
Diffstat (limited to 'include')
-rw-r--r--include/functions20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/functions b/include/functions
index 66b6abb4..4f3b15a9 100644
--- a/include/functions
+++ b/include/functions
@@ -42,6 +42,7 @@
# DisplayError Show an error on screen
# DisplayManual Output text to screen without any layout
# DisplayToolTip Show a tip for improving usage of the tool
+# DisplayWarning Show a clear warning on screen
# ExitClean Stop the program (cleanly), with exit code 0
# ExitCustom Stop the program (cleanly), with custom exit code
# ExitFatal Stop the program (cleanly), with exit code 1
@@ -608,6 +609,25 @@
################################################################################
+ # Name : DisplayWarning
+ # Description : Show a warning on the screen
+ #
+ # Input : $1 = text
+ # Returns : <nothing>
+ ################################################################################
+
+ DisplayWarning() {
+ if [ ${CRONJOB} -eq 0 ]; then
+ printf "\n"
+ ${ECHOCMD:-echo} " ${BG_WARNING}[WARNING]${NORMAL}: $1${NORMAL}"
+ printf "\n"
+ else
+ ${ECHOCMD} " [WARNING]: $1"
+ fi
+ }
+
+
+ ################################################################################
# Name : ExitClean()
# Description : Perform a normal exit of the program, and clean up resources
#