From 9203b01f88541a44f8c0f8ecd50ec66b14760be5 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Wed, 26 Oct 2016 12:34:56 +0200 Subject: [PATCH] [BOOT-5139] support for roles --- include/tests_boot_services | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/include/tests_boot_services b/include/tests_boot_services index ec8454ad..07db0317 100644 --- a/include/tests_boot_services +++ b/include/tests_boot_services @@ -362,17 +362,20 @@ Display --indent 2 --text "- Checking presence LILO" --result "${STATUS_OK}" --color GREEN LogText "Checking password option LILO" FIND=$(${EGREPBINARY} 'password[[:space:]]?=' ${LILOCONFFILE} | ${GREPBINARY} -v "^#") - if [ -z "${FIND}" && $MACHINE_ROLE = "server" || "workstation" ]; then - Display --indent 4 --text "- Password option presence " --result "${STATUS_WARNING}" --color RED - LogText "Result: no password set for LILO. Bootloader is unprotected to dropping to single user mode or unauthorized access to devices/data." - ReportSuggestion ${TEST_NO} "Add a password to LILO, by adding a line to the lilo.conf file, above the first line saying 'image=': password=" - ReportWarning ${TEST_NO} "No password set on LILO bootloader" - AddHP 0 2 - elif [ -z "${FIND}" && $MACHINE_ROLE = "personal"]; then + if [ -z "${FIND}" ]; then + if [ "${MACHINE_ROLE}" = "server" -o "${MACHINE_ROLE}" = "workstation" ]; then + Display --indent 4 --text "- Password option presence " --result "${STATUS_WARNING}" --color RED + LogText "Result: no password set for LILO. Bootloader is unprotected to dropping to single user mode or unauthorized access to devices/data." + ReportSuggestion ${TEST_NO} "Add a password to LILO, by adding a line to the lilo.conf file, above the first line saying 'image=': password=" + ReportWarning ${TEST_NO} "No password set on LILO bootloader" + AddHP 0 2 + elif [ "${MACHINE_ROLE}" = "personal"]; then Display --indent 4 --text "- Password option presence " --result "${STATUS_WARNING}" --color yellow LogText "Result: no password set for LILO. Bootloader is unprotected to dropping to single user mode or unauthorized access to devices/data." ReportSuggestion ${TEST_NO} "No password set on LILO bootloader. Add a password to LILO, by adding a line to the lilo.conf file, above the first line saying 'image=': password=" - AddHP 0 2 + AddHP 1 2 + else + LogText "Result: no password set for LILO, with unknown machine role" fi else Display --indent 4 --text "- Password option presence " --result "${STATUS_OK}" --color GREEN