diff options
author | asomers <asomers@FreeBSD.org> | 2017-05-05 21:59:34 +0000 |
---|---|---|
committer | asomers <asomers@FreeBSD.org> | 2017-05-05 21:59:34 +0000 |
commit | 5c1c0f2da36affad6aa05377dbf0fbab21da44f5 (patch) | |
tree | bb9252e7d7e8d9a5be226d6b1836f79cfdba35a4 /etc/periodic | |
parent | c0e994e0200f1687cadd48eb0ac61ab5be04e6fd (diff) | |
download | FreeBSD-src-5c1c0f2da36affad6aa05377dbf0fbab21da44f5.zip FreeBSD-src-5c1c0f2da36affad6aa05377dbf0fbab21da44f5.tar.gz |
MFC r316945-r316946
r316945:
Add 410.status-mfi, a periodic script for mfi(4) arrays
PR: 176049
Submitted by: doconnor@gsoft.com.au
Reviewed by: scottl, Larry Rosenman <ler@lerctr.org>
Relnotes: yes
r316946:
Reorder Makefile entries from r316945
PR: 176049
Reported by: Oliver Pinter
X-MFC-With: 316945
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 \ |