diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2017-07-28 11:42:17 +0300 |
---|---|---|
committer | Michael Boelen <michael.boelen@cisofy.com> | 2017-07-28 11:42:17 +0300 |
commit | dbec83566b6add3d38e5d95a502b7079bce3b93e (patch) | |
tree | 9a93fc89c761d008a58316fe36f7623bbe68591b /include/tests_filesystems | |
parent | ebc706aa64a572f5c7724e05764e10e065a39980 (diff) |
[FILE-6310] match mount points by exact name
Diffstat (limited to 'include/tests_filesystems')
-rw-r--r-- | include/tests_filesystems | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/tests_filesystems b/include/tests_filesystems index ecf556d2..0de44d34 100644 --- a/include/tests_filesystems +++ b/include/tests_filesystems @@ -48,16 +48,16 @@ Display --indent 4 --text "- Checking ${I} mount point" --result SYMLINK --color WHITE elif [ -d ${I} ]; then LogText "Result: directory ${I} exists" - FIND=$(${MOUNTBINARY} | ${GREPBINARY} "${I}") - if [ ! -z "${FIND}" ]; then - LogText "Result: found ${I} as a separated mount point" - Display --indent 4 --text "- Checking ${I} mount point" --result "${STATUS_OK}" --color GREEN - AddHP 10 10 - else + FIND=$(${MOUNTBINARY} | ${AWKBINARY} -v MP=${I} '{ if ($3==MP) { print $3 }}') + if IsEmpty "${FIND}"; then LogText "Result: ${I} not found in mount list. Directory most likely stored on / file system" Display --indent 4 --text "- Checking ${I} mount point" --result "${STATUS_SUGGESTION}" --color YELLOW ReportSuggestion ${TEST_NO} "To decrease the impact of a full ${I} file system, place ${I} on a separated partition" AddHP 9 10 + else + LogText "Result: found ${I} as a separated mount point" + Display --indent 4 --text "- Checking ${I} mount point" --result "${STATUS_OK}" --color GREEN + AddHP 10 10 fi else LogText "Result: directory ${I} does not exist" |