diff options
author | Yann ILAS <yann.ilas@gmail.com> | 2016-05-11 16:20:08 +0300 |
---|---|---|
committer | Michael Boelen <michael@cisofy.com> | 2016-05-11 16:20:08 +0300 |
commit | 125f704a10ce445ef7084a46386e06f62d85227e (patch) | |
tree | 18565398f4c0975adb00701bf930bc6c52f05852 /include/tests_filesystems | |
parent | 8ba1f51c19953900913213818b3f7501622398eb (diff) |
FILE-xyzz : Bind mount the /var/tmp directory to /tmp (#193)
Check if a bind mount is done between /var/tmp and the directory /tmp
Diffstat (limited to 'include/tests_filesystems')
-rw-r--r-- | include/tests_filesystems | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/tests_filesystems b/include/tests_filesystems index f4b2ad73..02f06d07 100644 --- a/include/tests_filesystems +++ b/include/tests_filesystems @@ -543,6 +543,35 @@ # ################################################################################# # + # Test : FILE-xyzz + # Description : Bind mount the /var/tmp directory to /tmp +# +################################################################################# +# + Register --test-no FILE-xyzz --os Linux --weight L --network NO --description "Checking /var/tmp is bind to /tmp" + if [ ${SKIPTEST} -eq 0 ]; then + if [ -f /etc/fstab ]; then + FIND=`cat /etc/fstab | awk '{ if ($2=="/var/tmp") { print $4 } }'` + BIND=`echo ${FIND} | awk '{ if ($1 ~ "bind") { print "YES" } else { print "NO" } }'` + + if [ ! "${FIND}" = "" ]; then + LogText "Result: mount system /var/tmp is configured with options: ${FIND}" + if [ "${BIND}" = "YES" ]; then + Display --indent 2 --text "- /var/tmp is bind to /tmp" --result OK --color GREEN + LogText "Result : /var/tmp is bind to /tmp" + else + Display --indent 2 --text "- /var/tmp is not bind to /tmp" --result "NON DEFAULT" --color RED + LogText "Result: /var/tmp is not bind to /tmp" + fi + else + LogText "Result: no mount point /var/tmp or expected options found" + Display --indent 2 --text "- /var/tmp is not bind to /tmp" --result "NON DEFAULT" --color RED + fi + fi + fi +# +################################################################################# +# # Test : FILE-6378 # Description : Check for nodirtime option # |