diff options
Diffstat (limited to 'lynis')
-rwxr-xr-x | lynis | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 # ################################################################################# # |