1154304Swollman#!/bin/sh 2154304Swollman# 3154304Swollman# $FreeBSD$ 4154304Swollman# 5154304Swollman 6154304Swollman# If there is a global system configuration file, suck it in. 7154304Swollman# 8154304Swollmanif [ -r /etc/defaults/periodic.conf ] 9154304Swollmanthen 10154304Swollman . /etc/defaults/periodic.conf 11154304Swollman source_periodic_confs 12154304Swollmanfi 13154304Swollman 14154304Swollmancase "$daily_status_gmirror_enable" in 15154304Swollman [Yy][Ee][Ss]) 16154304Swollman echo 17154304Swollman echo 'Checking status of gmirror(8) devices:' 18154304Swollman 19154304Swollman if gmirror status; then 20154304Swollman components="$(gmirror status -s | fgrep -v COMPLETE)" 21154304Swollman if [ "${components}" ]; then 22154304Swollman rc=3 23154304Swollman else 24154304Swollman rc=0 25154304Swollman fi 26154304Swollman else 27154304Swollman rc=2 28154304Swollman fi 29154304Swollman ;; 30154304Swollman 31154304Swollman *) rc=0;; 32154304Swollmanesac 33154304Swollman 34154304Swollmanexit $rc 35