diff options
Diffstat (limited to 'etc/periodic')
-rw-r--r-- | etc/periodic/daily/410.status-mfi | 33 | ||||
-rw-r--r-- | etc/periodic/daily/Makefile | 1 |
2 files changed, 34 insertions, 0 deletions
diff --git a/etc/periodic/daily/410.status-mfi b/etc/periodic/daily/410.status-mfi new file mode 100644 index 0000000..6e13fbb --- /dev/null +++ b/etc/periodic/daily/410.status-mfi @@ -0,0 +1,33 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_mfi_enable" in + [Yy][Ee][Ss]) + echo + echo 'Checking status of mfi(4) devices:' + + if mfiutil show volumes; then + if mfiutil show volumes | grep -q DEGRADED; then + rc=3 + else + rc=0 + fi + else + rc=2 + fi + ;; + + *) rc=0;; +esac + +exit $rc diff --git a/etc/periodic/daily/Makefile b/etc/periodic/daily/Makefile index d2052f2..56ab5ae 100644 --- a/etc/periodic/daily/Makefile +++ b/etc/periodic/daily/Makefile @@ -16,6 +16,7 @@ FILES= 100.clean-disks \ 407.status-graid3 \ 408.status-gstripe \ 409.status-gconcat \ + 410.status-mfi \ 420.status-network \ 430.status-uptime \ 450.status-security \ |