File cifs of Package check_mk-cifs

#!/bin/bash

STAT_VERSION=$(stat --version | head -1 | cut -d" " -f4)
STAT_BROKE="5.3.0"

echo '<<<cifsmounts>>>'
sed -n '/ cifs\? /s/[^ ]* \([^ ]*\) .*/\1/p' < /proc/mounts |
while read MP
do
     if [ $STAT_VERSION != $STAT_BROKE ]; then
        waitmax -s 9 2 stat -f -c "$MP ok %b %f %a %s" "$MP" || \
            echo "$MP hanging 0 0 0 0"
     else
        waitmax -s 9 2 stat -f -c "$MP ok %b %f %a %s" "$MP" && \
        printf '\n'|| echo "$MP hanging 0 0 0 0"
     fi
done