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:
-rw-r--r--include/functions43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/functions b/include/functions
index 89b970e5..66b20715 100644
--- a/include/functions
+++ b/include/functions
@@ -39,6 +39,7 @@
# DiscoverProfiles Determine available profiles on system
# Display Output text to screen with colors and identation
# DisplayManual Output text to screen without any layout
+# DisplayToolTip Show a tip for improving usage of the tool
# 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
@@ -444,6 +445,27 @@
################################################################################
+ # Name : DisplayToolTip()
+ # Description : Show tooltip on screen
+ #
+ # Input : $1 = text
+ # Returns : <nothing>
+ ################################################################################
+
+ DisplayToolTip() {
+ if [ ${SHOW_TOOL_TIPS} -eq 1 ]; then
+ if [ ${CRONJOB} -eq 0 ]; then
+ # Check if we already have already discovered a proper echo command tool. It not, set it default to 'echo'.
+ if [ "${ECHOCMD}" = "" ]; then ECHOCMD="echo"; fi
+ ${ECHOCMD} "${WHITE}[${BLUE}Tool Tip${NORMAL}${WHITE}]${NORMAL}: $1"
+ else
+ echo "${TEXT}${RESULTPART}"
+ fi
+ fi
+ }
+
+
+ ################################################################################
# Name : Display()
# Description : Show text on screen, with markup
#
@@ -537,6 +559,27 @@
################################################################################
+ # Name : DisplayToolTip()
+ # Description : Show tooltip on screen
+ #
+ # Input : $1 = text
+ # Returns : <nothing>
+ ################################################################################
+
+ DisplayToolTip() {
+ if [ ${SHOW_TOOL_TIPS} -eq 1 ]; then
+ if [ ${CRONJOB} -eq 0 ]; then
+ # Check if we already have already discovered a proper echo command tool. It not, set it default to 'echo'.
+ if [ "${ECHOCMD}" = "" ]; then ECHOCMD="echo"; fi
+ ${ECHOCMD} "${WHITE}[${BLUE}TOOLTIP${NORMAL}${WHITE}]${NORMAL} ${WHITE}$1${NORMAL}"
+ else
+ echo "${TEXT}${RESULTPART}"
+ fi
+ fi
+ }
+
+
+ ################################################################################
# Name : ExitClean()
# Description : Perform a normal exit of the program, and clean up resources
#