mirror of
https://github.com/CISOfy/lynis.git
synced 2025-09-25 10:57:53 +02:00
Added DisplayWarning function
This commit is contained in:
parent
a49ea33fea
commit
7a816ece8a
@ -42,6 +42,7 @@
|
|||||||
# DisplayError Show an error on screen
|
# DisplayError Show an error on screen
|
||||||
# DisplayManual Output text to screen without any layout
|
# DisplayManual Output text to screen without any layout
|
||||||
# DisplayToolTip Show a tip for improving usage of the tool
|
# 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
|
# ExitClean Stop the program (cleanly), with exit code 0
|
||||||
# ExitCustom Stop the program (cleanly), with custom exit code
|
# ExitCustom Stop the program (cleanly), with custom exit code
|
||||||
# ExitFatal Stop the program (cleanly), with exit code 1
|
# ExitFatal Stop the program (cleanly), with exit code 1
|
||||||
@ -607,6 +608,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()
|
# Name : ExitClean()
|
||||||
# Description : Perform a normal exit of the program, and clean up resources
|
# Description : Perform a normal exit of the program, and clean up resources
|
||||||
|
Loading…
x
Reference in New Issue
Block a user