Re: svn commit: r249095 - in head/etc: defaults periodic/daily

2013-04-05 Thread N.J. Mann
In message 201304041503.r34f3c5l094...@svn.freebsd.org,
Alexander Motin (m...@freebsd.org) wrote:
 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)

As graid is in 9.x will you be MFCing this addition?


Cheers,
   Nick.
-- 

___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r249095 - in head/etc: defaults periodic/daily

2013-04-05 Thread Alexander Motin

On 05.04.2013 12:02, N.J. Mann wrote:

In message 201304041503.r34f3c5l094...@svn.freebsd.org,
Alexander Motin (m...@freebsd.org) wrote:

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)


As graid is in 9.x will you be MFCing this addition?


Sure. I just didn't know/remember about these scripts till this time.

--
Alexander Motin
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


svn commit: r249095 - in head/etc: defaults periodic/daily

2013-04-04 Thread Alexander Motin
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-graidThu 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/MakefileThu Apr  4 12:03:30 2013
(r249094)
+++ head/etc/periodic/daily/MakefileThu 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 \
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org