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--default.prf7
-rw-r--r--include/profiles4
-rwxr-xr-xlynis7
3 files changed, 11 insertions, 7 deletions
diff --git a/default.prf b/default.prf
index f2738c78..0695ec47 100644
--- a/default.prf
+++ b/default.prf
@@ -33,13 +33,12 @@ compressed-uploads=yes
# Show non-zero exit code when warnings are found
error-on-warnings=no
-# Use Lynis in your own language (available languages: en fr nl)
-language=en
+# Use Lynis in your own language (by default auto-detected)
+language=
-# Add your Lynis Enterprise license key here
+# Lynis Enterprise license key
license-key=
-
# Defines the role of the system (desktop, server)
machine-role=server
diff --git a/include/profiles b/include/profiles
index 89bd26a5..e0182f03 100644
--- a/include/profiles
+++ b/include/profiles
@@ -139,7 +139,9 @@
# Language
language | lang)
LogText "Language set via profile to ${VALUE}"
- LANGUAGE="${VALUE}"
+ if [ ! -z "${VALUE}" ]; then
+ LANGUAGE="${VALUE}"
+ fi
AddSetting "language" "${LANGUAGE}" "Language"
;;
diff --git a/lynis b/lynis
index ec1bb961..84989720 100755
--- a/lynis
+++ b/lynis
@@ -99,8 +99,11 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta
fi
# Auto detection of language based on locale (first two characters). Set to English when nothing found.
- LANGUAGE=$(locale | egrep "^LANG=" | cut -d= -f2 | cut -d_ -f1)
- if [ "${LANGUAGE}" = "" ]; then LANGUAGE="en"; fi
+ LANGUAGE=$(locale | egrep "^LANG=" | cut -d= -f2 | cut -d_ -f1 | egrep "^[a-z]{2}$")
+ if [ -z "${LANGUAGE}" ]; then
+ #Debug "Result: no (valid) language found, setting to default language (en)"
+ LANGUAGE="en"
+ fi
#
#################################################################################
#