;;
esac
+# SELinux adds extra xattrs which can mess up our expected output.
+# So, mount with a context, and they won't be created
+# # nfs_t is a "liberal" context so we can use it.
+if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
+ SELINUX_MOUNT_OPTIONS="-o context=system_u:object_r:nfs_t:s0"
+ export SELINUX_MOUNT_OPTIONS
+fi
+
_mount_opts()
{
- # SELinux adds extra xattrs which can mess up our expected output.
- # So, mount with a context, and they won't be created
- # # nfs_t is a "liberal" context so we can use it.
- if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
- SELINUX_MOUNT_OPTIONS="-o context=system_u:object_r:nfs_t:s0"
- export SELINUX_MOUNT_OPTIONS
- fi
-
case $FSTYP in
xfs)
export MOUNT_OPTIONS=$XFS_MOUNT_OPTIONS