diff --git a/include/tests_kernel b/include/tests_kernel index 494680a1..fb88a467 100644 --- a/include/tests_kernel +++ b/include/tests_kernel @@ -123,13 +123,13 @@ Report "cpu_nx=1" FOUND=1 else - if [ HasData "${FIND_PAE}" -a IsEmpty "${FIND_NX}" ]; then + if HasData "${FIND_PAE}" && IsEmpty "${FIND_NX}"; then Report "cpu_pae=1" LogText "Result: found PAE" CPU_PAE=1 FOUND=1 else - if [ HasData "${FIND_NX}" -a IsEmpty "${FIND_PAE}" ]; then + if HasData "${FIND_NX}" && IsEmpty "${FIND_PAE}"; then Report "cpu_nx=1" LogText "Result: found No eXecute" CPU_NX=1 diff --git a/lynis b/lynis index ab81fd1e..4b804b5c 100755 --- a/lynis +++ b/lynis @@ -109,7 +109,9 @@ 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 | egrep "^[a-z]{2}$") + if [ -x "$(command -v locale)" ]; then + LANGUAGE=$(locale | egrep "^LANG=" | cut -d= -f2 | cut -d_ -f1 | egrep "^[a-z]{2}$") + fi if [ -z "${LANGUAGE}" ]; then #Debug "Result: no (valid) language found, setting to default language (en)" LANGUAGE="en"