#!/bin/sh
. /usr/lib64/nagios/plugins/utils.sh

if [ $# -ge 1 ]; then
    CHECKS=`/usr/bin/fs checks -cell "$1" -fast`
else
    CHECKS=`/usr/bin/fs checks -all -fast`
fi

STATUS=$?

$ECHO "$CHECKS"

if [ $STATUS -gt 0 ]; then
    if $ECHO "$CHECKS" | grep -i COCYTUS >/dev/null; then
	exit $STATE_CRITICAL;
    else
	exit $STATE_WARNING;
    fi
else
    exit $STATE_OK;
fi
