]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - etc/periodic/daily/408.status-gstripe
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / etc / periodic / daily / 408.status-gstripe
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 # If there is a global system configuration file, suck it in.
7 #
8 if [ -r /etc/defaults/periodic.conf ]
9 then
10     . /etc/defaults/periodic.conf
11     source_periodic_confs
12 fi
13
14 case "$daily_status_gstripe_enable" in
15     [Yy][Ee][Ss])
16         echo
17         echo 'Checking status of gstripe(8) devices:'
18
19         if gstripe status; then
20                 components="$(gstripe 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;;
32 esac
33
34 exit $rc