Proper display of tool tips configuration, while not showing tips when using show module

This commit is contained in:
Michael Boelen 2016-07-12 20:09:10 +02:00
parent c090e73ca1
commit cb76421d9c
4 changed files with 10 additions and 18 deletions

View File

@ -165,6 +165,7 @@ unset LANG
SHELL_IS_BUSYBOX=0
SHOW_PROGRAM_DETAILS=1
SHOW_REPORT=1
SHOW_TOOL_TIPS=1 # Show inline tool tips (default true)
SHOW_WARNINGS_ONLY=0
SKIP_PLUGINS=0
SKIP_TESTS=""
@ -216,7 +217,6 @@ unset LANG
PENTESTINGMODE=0 # Try tests without root privileges
QUICKMODE=0 # Don't wait for user input
QUIET=0 # Show normal messages and warnings as well
SHOW_TOOL_TIPS=1 # Show inline tool tips (default true)
SKIPLOGTEST=0 # Skip logging for one test
SKIP_UPGRADE_TEST=0 # Skip upgrade test
TESTS_TO_PERFORM="" # Which tests only to perform

View File

@ -38,6 +38,7 @@ lynis show ${BROWN}dbdir${NORMAL} (database directory)
lynis show ${BROWN}help${NORMAL} (detailed information about arguments)
lynis show ${BROWN}hostids${NORMAL} (unique IDs for this system)
lynis show ${BROWN}includedir${NORMAL} (include directory for tests and functions)
lynis show ${BROWN}language${NORMAL} (configured or detected language)
lynis show ${BROWN}license${NORMAL} (license details)
lynis show ${BROWN}man${NORMAL} (show help)
lynis show ${BROWN}options${NORMAL} (available flags and options)
@ -170,6 +171,7 @@ if [ $# -gt 0 ]; then
"includedir")
${ECHOCMD} "${INCLUDEDIR}"
;;
"language") ${ECHOCMD} "${LANGUAGE}" ;;
"license") ${ECHOCMD} "${PROGRAM_LICENSE}" ;;
"man") ${ECHOCMD} "Use ./lynis --man or man lynis" ;;
"options") ${ECHOCMD} "${OPTIONS}" ;;

View File

@ -114,26 +114,14 @@
CHECK_BINARIES=0
RUN_HELPERS=1
HELPER="show"
SKIP_PLUGINS=1
RUN_TESTS=0
SKIP_PLUGINS=1
SHOW_TOOL_TIPS=0
QUIET=1
SHOW_PROGRAM_DETAILS=0
shift
HELPER_PARAMS="$1 $2"
break
#if [ ! $2 = "" ]; then
# shift
# HELPER_PARAMS="$1 $2"
# break
# else
# echo "${RED}Error: ${WHITE}Need more specifics for show${NORMAL}"
# echo " "
# echo "Examples:"
# echo "lynis show config"
# echo "lynis show plugins"
# echo "lynis show version"
# ExitFatal
#fi
;;
update)

View File

@ -206,9 +206,11 @@
# Inline tips about tool (default enabled)
show_tool_tips | show-tool-tips)
FIND=`echo "${VALUE}" | egrep "^(1|false|no)$"` && SHOW_TOOL_TIPS=0
Debug "Show tool tips set to ${SHOW_TOOL_TIPS}"
AddSetting "show-tool-tips" "${SHOW_TOOL_TIPS}" "Show tool tips"
SETTING_SHOW_TOOL_TIPS=1 # default is yes
FIND=`echo "${VALUE}" | egrep "^(0|false|no)$"` && SHOW_TOOL_TIPS=0
if [ ! -z "${FIND}" ]; then SETTING_QUICK_MODE=0; fi
Debug "Show tool tips set to ${SETTING_SHOW_TOOL_TIPS}"
AddSetting "show-tool-tips" "${SETTING_SHOW_TOOL_TIPS}" "Show tool tips"
;;
# Show warnings only