diff options
Diffstat (limited to 'usr.sbin/periodic/etc/daily/408.status-gstripe')
-rwxr-xr-x | usr.sbin/periodic/etc/daily/408.status-gstripe | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/usr.sbin/periodic/etc/daily/408.status-gstripe b/usr.sbin/periodic/etc/daily/408.status-gstripe new file mode 100755 index 000000000000..ff74f76e3c7c --- /dev/null +++ b/usr.sbin/periodic/etc/daily/408.status-gstripe @@ -0,0 +1,34 @@ +#!/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_gstripe_enable" in + [Yy][Ee][Ss]) + echo + echo 'Checking status of gstripe(8) devices:' + + if gstripe status; then + components="$(gstripe status -s | fgrep -v UP)" + if [ "${components}" ]; then + rc=3 + else + rc=0 + fi + else + rc=2 + fi + ;; + + *) rc=0;; +esac + +exit $rc |