#!/bin/bash #(C)2007 DatuX. All rights reserved. STAT=/tmp/areca.$$ cciss_vol_status /dev/cciss/c?d? /dev/sg? > $STAT 2>/dev/null #geen controller? if [ "`cat $STAT`" == "" ]; then rm $STAT syn3-state 'raid-cciss' DELETE exit 0 fi #is er IETS niet OK? if grep -v OK $STAT >/dev/null; then #iets anders dan recovery of OK? if egrep -v 'OK|recovering' $STAT >/dev/null; then syn3-state 'raid-cciss' ALERT "Trouble with raid array: `cat $STAT`" else syn3-state 'raid-cciss' CAUTION "Raid array is rebuilding: `cat $STAT`" fi else syn3-state 'raid-cciss' OK "Raid array is online: `cat $STAT`" fi rm $STAT