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>2017-02-16 12:27:54 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2017-02-16 12:27:54 +0300
commit8d6bc1ad21c052fb6b552d8ee89e632e447f1c2b (patch)
tree4c90a6e998b86a222dc52344e00a5c598c0d515e
parent97d018f62d437c27e203314beebae3cfb7569030 (diff)
Allow colored output to be configured from profile
-rw-r--r--default.prf3
-rw-r--r--include/profiles11
2 files changed, 14 insertions, 0 deletions
diff --git a/default.prf b/default.prf
index e1193616..6adf7d8c 100644
--- a/default.prf
+++ b/default.prf
@@ -27,6 +27,9 @@
#
#################################################################################
+# Use colored output
+colors=yes
+
# Compressed uploads (set to zero when errors with uploading occur)
compressed-uploads=yes
diff --git a/include/profiles b/include/profiles
index 2e8556b8..11917586 100644
--- a/include/profiles
+++ b/include/profiles
@@ -65,6 +65,17 @@
CHECK_VALUE_ARRAY="${CHECK_OPTION_ARRAY} ${STRING}"
;;
+ # Colored output
+ colors)
+ # Quick mode (SKIP_PLUGINS) might already be set outside profile, so store in different variable
+ SETTING_COLORS=1 # default is yes
+ FIND=$(echo "${VALUE}" | egrep "^(0|false|no)$") && COLORS=0
+ if [ ! -z "${FIND}" ]; then SETTING_COLORS=0; RemoveColors; fi
+ Debug "Colors set to ${SETTING_COLORS}"
+ AddSetting "colors" "${SETTING_COLORS}" "Colored screen output"
+ unset SETTING_COLORS
+ ;;
+
# Ignore configuration data
config-data)
Debug "Ignoring configuration option, as it will be used by a specific test"