diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-30 14:54:04 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2016-07-30 14:54:04 +0300 |
commit | 0ec7f45f05acd51b1ed27ab9f35ed527bed5cad5 (patch) | |
tree | d6dce22c3c73dd050753813fc1c4761db42ce925 | |
parent | 0e18551b2c530ae137b7bd7493ff4898d982535c (diff) |
[AUTH-9268] Improve readability of test
-rw-r--r-- | include/tests_authentication | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/include/tests_authentication b/include/tests_authentication index c25b7ca0..afaccd24 100644 --- a/include/tests_authentication +++ b/include/tests_authentication @@ -579,28 +579,29 @@ if [ ${SKIPTEST} -eq 0 ]; then FOUND=0 LogText "Test: Searching pam modules" - for I in ${PAM_FILE_LOCATIONS}; do - LogText "Test: Checking ${I}" - if [ -d ${I} -a ! -L ${I} ]; then - LogText "Result: directory ${I} exists" + for DIR in ${PAM_FILE_LOCATIONS}; do + LogText "Test: Checking ${DIR}" + if [ -d ${DIR} -a ! -L ${DIR} ]; then + LogText "Result: directory ${DIR} exists" # Search in the specified directory - FIND=`find ${I} -maxdepth 1 -type f -name "pam_*.so" -print | sort` + FIND=`find ${DIR} -maxdepth 1 -type f -name "pam_*.so" -print | sort` if [ ! "${FIND}" = "" ]; then FOUND=1; fi - for I in ${FIND}; do - LogText "Found file: ${I}" - Report "pam_module[]=${I}" + for FILE in ${FIND}; do + LogText "Found file: ${FILE}" + Report "pam_module[]=${FILE}" done - else - LogText "Result: directory ${I} could not be found or is a symlink to another directory" + else + LogText "Result: directory ${DIR} could not be found or is a symlink to another directory" fi done # Check if we found at least one module if [ ${FOUND} -eq 0 ]; then Display --indent 2 --text "- Checking PAM modules" --result "${STATUS_NOT_FOUND}" --color WHITE LogText "Result: no PAM modules found" - else + else Display --indent 2 --text "- Checking PAM modules" --result "${STATUS_FOUND}" --color GREEN fi + unset DIR; unset FILE; unset FIND fi # ################################################################################# |