diff options
author | pav <pav@FreeBSD.org> | 2009-12-20 20:43:39 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2009-12-20 20:43:39 +0800 |
commit | 90b946d73c697ab2e38d40f947442d57c90e9298 (patch) | |
tree | 3e3883708adca896476e379d8337481f309c2737 /sysutils/arcconf | |
parent | 4e496bac2808604cec96d5965adedd9d8dccce2a (diff) | |
download | freebsd-ports-gnome-90b946d73c697ab2e38d40f947442d57c90e9298.tar.gz freebsd-ports-gnome-90b946d73c697ab2e38d40f947442d57c90e9298.tar.zst freebsd-ports-gnome-90b946d73c697ab2e38d40f947442d57c90e9298.zip |
- Add missed file
Diffstat (limited to 'sysutils/arcconf')
-rw-r--r-- | sysutils/arcconf/files/410.status-aac-raid.in | 30 |
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 |