mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-21 12:54:33 +02:00
Set initial value for language and improve auto detection
This commit is contained in:
parent
cb76421d9c
commit
07a113e46e
@ -33,13 +33,12 @@ compressed-uploads=yes
|
|||||||
# Show non-zero exit code when warnings are found
|
# Show non-zero exit code when warnings are found
|
||||||
error-on-warnings=no
|
error-on-warnings=no
|
||||||
|
|
||||||
# Use Lynis in your own language (available languages: en fr nl)
|
# Use Lynis in your own language (by default auto-detected)
|
||||||
language=en
|
language=
|
||||||
|
|
||||||
# Add your Lynis Enterprise license key here
|
# Lynis Enterprise license key
|
||||||
license-key=
|
license-key=
|
||||||
|
|
||||||
|
|
||||||
# Defines the role of the system (desktop, server)
|
# Defines the role of the system (desktop, server)
|
||||||
machine-role=server
|
machine-role=server
|
||||||
|
|
||||||
|
@ -139,7 +139,9 @@
|
|||||||
# Language
|
# Language
|
||||||
language | lang)
|
language | lang)
|
||||||
LogText "Language set via profile to ${VALUE}"
|
LogText "Language set via profile to ${VALUE}"
|
||||||
|
if [ ! -z "${VALUE}" ]; then
|
||||||
LANGUAGE="${VALUE}"
|
LANGUAGE="${VALUE}"
|
||||||
|
fi
|
||||||
AddSetting "language" "${LANGUAGE}" "Language"
|
AddSetting "language" "${LANGUAGE}" "Language"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
7
lynis
7
lynis
@ -99,8 +99,11 @@ Make sure to execute ${PROGRAM_NAME} from untarred directory or check your insta
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Auto detection of language based on locale (first two characters). Set to English when nothing found.
|
# 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)
|
LANGUAGE=$(locale | egrep "^LANG=" | cut -d= -f2 | cut -d_ -f1 | egrep "^[a-z]{2}$")
|
||||||
if [ "${LANGUAGE}" = "" ]; then LANGUAGE="en"; fi
|
if [ -z "${LANGUAGE}" ]; then
|
||||||
|
#Debug "Result: no (valid) language found, setting to default language (en)"
|
||||||
|
LANGUAGE="en"
|
||||||
|
fi
|
||||||
#
|
#
|
||||||
#################################################################################
|
#################################################################################
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user