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
path: root/lynis
diff options
context:
space:
mode:
Diffstat (limited to 'lynis')
-rwxr-xr-xlynis7
1 files changed, 5 insertions, 2 deletions
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
#
#################################################################################
#