diff options
| author | Garrett Wollman <wollman@FreeBSD.org> | 2006-01-13 18:07:52 +0000 |
|---|---|---|
| committer | Garrett Wollman <wollman@FreeBSD.org> | 2006-01-13 18:07:52 +0000 |
| commit | 9960bd718b5fd854cd9c54d40fee99526ce79cdc (patch) | |
| tree | 24216b2b8c966ac4ca96a3b38c330ead1dce0cd0 | |
| parent | 28cda5420f4a3cf42fc432134e9c5e1c11d8b9ae (diff) | |
Notes
| -rw-r--r-- | etc/defaults/periodic.conf | 3 | ||||
| -rw-r--r-- | etc/periodic/daily/406.status-gmirror | 34 |
2 files changed, 37 insertions, 0 deletions
diff --git a/etc/defaults/periodic.conf b/etc/defaults/periodic.conf index fd0cd1a3959e..c83986448906 100644 --- a/etc/defaults/periodic.conf +++ b/etc/defaults/periodic.conf @@ -91,6 +91,9 @@ daily_status_disks_df_flags="-k -t nonfs" # df(1) flags for check # 405.status-ata_raid daily_status_ata_raid_enable="NO" # Check ATA raid status +# 406.status-gmirror +daily_status_gmirror_enable="NO" # Check gmirror(8) + # 420.status-network daily_status_network_enable="YES" # Check network status daily_status_network_usedns="YES" # DNS lookups are ok diff --git a/etc/periodic/daily/406.status-gmirror b/etc/periodic/daily/406.status-gmirror new file mode 100644 index 000000000000..8fc698c804d2 --- /dev/null +++ b/etc/periodic/daily/406.status-gmirror @@ -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_gmirror_enable" in + [Yy][Ee][Ss]) + echo + echo 'Checking status of gmirror(8) devices:' + + if gmirror status; then + components="$(gmirror status -s | fgrep -v COMPLETE)" + if [ "${components}" ]; then + rc=3 + else + rc=0 + fi + else + rc=2 + fi + ;; + + *) rc=0;; +esac + +exit $rc |
