aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sysutils/arcconf/files/410.status-aac-raid.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/sysutils/arcconf/files/410.status-aac-raid.in b/sysutils/arcconf/files/410.status-aac-raid.in
new file mode 100644
index 000000000000..6fabbff7d766
--- /dev/null
+++ b/sysutils/arcconf/files/410.status-aac-raid.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+if [ -r /etc/defaults/periodic.conf ]
+then
+ . /etc/defaults/periodic.conf
+ source_periodic_confs
+fi
+
+case "$daily_status_aac_raid_enable" in
+ [Yy][Ee][Ss])
+ echo
+ echo 'Checking status of Adaptec RAID:'
+
+ rc=0
+ arcconf=/usr/local/sbin/arcconf
+ tmpfile=`mktemp -q /tmp/aac-raid.XXXXXX`
+ $arcconf GETCONFIG 1 AD | tee $tmpfile
+ control_ok=`grep -i -c 'Controller Status.*Optimal' $tmpfile`
+ $arcconf GETCONFIG 1 LD | tee $tmpfile
+ volume_ok=`grep -i -c 'Status of logical device.*Optimal' $tmpfile`
+ rm $tmpfile
+ if [ $control_ok -eq 0 -o $volume_ok -eq 0 ]; then
+ rc=3
+ fi
+ ;;
+
+ *) rc=0;;
+esac
+
+exit $rc