xref: /freebsd/usr.sbin/periodic/etc/daily/409.status-gconcat (revision 19fae0f66023a97a9b464b3beeeabb2081f575b3)
1#!/bin/sh
2#
3# $FreeBSD$
4#
5
6# If there is a global system configuration file, suck it in.
7#
8if [ -r /etc/defaults/periodic.conf ]
9then
10    . /etc/defaults/periodic.conf
11    source_periodic_confs
12fi
13
14case "$daily_status_gconcat_enable" in
15    [Yy][Ee][Ss])
16	echo
17	echo 'Checking status of gconcat(8) devices:'
18
19	if gconcat status; then
20		components="$(gconcat status -s | fgrep -v UP)"
21		if [ "${components}" ]; then
22			rc=3
23		else
24			rc=0
25		fi
26	else
27		rc=2
28	fi
29	;;
30
31    *)  rc=0;;
32esac
33
34exit $rc
35