From owner-svn-src-head@FreeBSD.ORG Thu Apr 4 15:03:13 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3227F4C1; Thu, 4 Apr 2013 15:03:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0C61B88B; Thu, 4 Apr 2013 15:03:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34F3CMT094464; Thu, 4 Apr 2013 15:03:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34F3C5l094458; Thu, 4 Apr 2013 15:03:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304041503.r34F3C5l094458@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 15:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249095 - in head/etc: defaults periodic/daily X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Apr 2013 15:03:13 -0000 Author: mav Date: Thu Apr 4 15:03:12 2013 New Revision: 249095 URL: http://svnweb.freebsd.org/changeset/base/249095 Log: Remove periodic script for ataraid(4) and add instead script for graid(8). Added: head/etc/periodic/daily/401.status-graid (contents, props changed) Deleted: head/etc/periodic/daily/405.status-ata-raid Modified: head/etc/defaults/periodic.conf head/etc/periodic/daily/Makefile Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Thu Apr 4 12:03:30 2013 (r249094) +++ head/etc/defaults/periodic.conf Thu Apr 4 15:03:12 2013 (r249095) @@ -95,13 +95,13 @@ 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 -# 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) Added: head/etc/periodic/daily/401.status-graid ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/periodic/daily/401.status-graid Thu Apr 4 15:03:12 2013 (r249095) @@ -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: head/etc/periodic/daily/Makefile ============================================================================== --- head/etc/periodic/daily/Makefile Thu Apr 4 12:03:30 2013 (r249094) +++ head/etc/periodic/daily/Makefile Thu Apr 4 15:03:12 2013 (r249095) @@ -8,7 +8,7 @@ FILES= 100.clean-disks \ 200.backup-passwd \ 330.news \ 400.status-disks \ - 405.status-ata-raid \ + 401.status-graid \ 406.status-gmirror \ 407.status-graid3 \ 408.status-gstripe \