svn commit: r253202 - in stable/9/etc: defaults periodic/daily
Alexander Motin
mav at FreeBSD.org
Thu Jul 11 09:27:57 UTC 2013
Author: mav
Date: Thu Jul 11 09:27:56 2013
New Revision: 253202
URL: http://svnweb.freebsd.org/changeset/base/253202
Log:
Partially MFC r249095:
Add period script for graid(8) monitoring.
Added:
stable/9/etc/periodic/daily/401.status-graid
- copied unchanged from r249095, head/etc/periodic/daily/401.status-graid
Modified:
stable/9/etc/defaults/periodic.conf
stable/9/etc/periodic/daily/Makefile
Directory Properties:
stable/9/etc/ (props changed)
Modified: stable/9/etc/defaults/periodic.conf
==============================================================================
--- stable/9/etc/defaults/periodic.conf Thu Jul 11 09:13:05 2013 (r253201)
+++ stable/9/etc/defaults/periodic.conf Thu Jul 11 09:27:56 2013 (r253202)
@@ -94,6 +94,9 @@ daily_news_expire_enable="YES" # Run
daily_status_disks_enable="YES" # Check disk status
daily_status_disks_df_flags="-l -h" # df(1) flags for check
+# 401.status-graid
+daily_status_graid_enable="NO" # Check graid(8)
+
# 404.status-zfs
daily_status_zfs_enable="NO" # Check ZFS
daily_status_zfs_zpool_list_enable="YES" # List ZFS pools
Copied: stable/9/etc/periodic/daily/401.status-graid (from r249095, head/etc/periodic/daily/401.status-graid)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/9/etc/periodic/daily/401.status-graid Thu Jul 11 09:27:56 2013 (r253202, copy of r249095, head/etc/periodic/daily/401.status-graid)
@@ -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_graid_enable" in
+ [Yy][Ee][Ss])
+ echo
+ echo 'Checking status of graid(8) devices:'
+
+ if graid status; then
+ components="$(graid status -s | fgrep -v OPTIMAL)"
+ if [ "${components}" ]; then
+ rc=3
+ else
+ rc=0
+ fi
+ else
+ rc=2
+ fi
+ ;;
+
+ *) rc=0;;
+esac
+
+exit $rc
Modified: stable/9/etc/periodic/daily/Makefile
==============================================================================
--- stable/9/etc/periodic/daily/Makefile Thu Jul 11 09:13:05 2013 (r253201)
+++ stable/9/etc/periodic/daily/Makefile Thu Jul 11 09:27:56 2013 (r253202)
@@ -10,6 +10,7 @@ FILES= 100.clean-disks \
220.backup-pkgdb \
330.news \
400.status-disks \
+ 401.status-graid \
405.status-ata-raid \
406.status-gmirror \
407.status-graid3 \
More information about the svn-src-stable-9
mailing list