Date: Thu, 4 Apr 2013 15:03:12 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> 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 Message-ID: <201304041503.r34F3C5l094458@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304041503.r34F3C5l094458>