From owner-freebsd-bugs@FreeBSD.ORG Mon Oct 24 14:30:24 2005 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA5BD16A41F for ; Mon, 24 Oct 2005 14:30:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5490E43D60 for ; Mon, 24 Oct 2005 14:30:22 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j9OEUMpf094847 for ; Mon, 24 Oct 2005 14:30:22 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j9OEUM32094846; Mon, 24 Oct 2005 14:30:22 GMT (envelope-from gnats) Resent-Date: Mon, 24 Oct 2005 14:30:22 GMT Resent-Message-Id: <200510241430.j9OEUM32094846@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Olli Hauer Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BABA116A41F for ; Mon, 24 Oct 2005 14:25:17 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E0F743D45 for ; Mon, 24 Oct 2005 14:25:17 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j9OEPHqJ079849 for ; Mon, 24 Oct 2005 14:25:17 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j9OEPHos079848; Mon, 24 Oct 2005 14:25:17 GMT (envelope-from nobody) Message-Id: <200510241425.j9OEPHos079848@www.freebsd.org> Date: Mon, 24 Oct 2005 14:25:17 GMT From: Olli Hauer To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: conf/87925: periodic daily_status_ata_raid with mounted fdescfs X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2005 14:30:24 -0000 >Number: 87925 >Category: conf >Synopsis: periodic daily_status_ata_raid with mounted fdescfs >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 24 14:30:21 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Olli Hauer >Release: 5.4-RELEASE-p8 >Organization: >Environment: 5.4-RELEASE-p8 FreeBSD 5.4-RELEASE-p8 #0: Sat Oct 22 18:42:00 CEST 2005 >Description: strange output in daily status if fdescfs is mounted (for OpenBSD spamd) and daily_status_ata_raid_enable="YES" in /etc/periodic.conf >How-To-Repeat: mount fdescfs set daily_status_ata_raid_enable="YES" in /etc/periodic.conf sh /etc/periodic/daily/405.status-ata-raid it doesn't metter if some raid is installed or not watch the output >Fix: two solutions: 1. supress output from find in the daily/405 script (ugly) --- 405.status-ata-raid.orig Sun May 8 09:05:11 2005 +++ 405.status-ata-raid Mon Oct 24 15:32:13 2005 @@ -17,7 +17,7 @@ echo 'Checking status of ATA raid partitions:' rc=0 - for raid in `find /dev/ -name 'ar[0-9]*' -type c | egrep '[0-9]$' \ + for raid in `find /dev/ -name 'ar[0-9]*' -type c 2> /dev/null | egrep '[0-9]$' \ | egrep -v 's[0-9]' | cut -d / -f 3` do status=`/sbin/atacontrol status $raid` 2. extend periodic.conf and the daily/405 script periodic.conf extra parameter daily_status_ata_raid_ar_list="" # list of numbers, sample: 0 exapnds to ar0 change 405 script to something like this (if the extra parameter daily_status_ata_raid_ar_list is not set, the script works like before) #!/bin/sh # # $FreeBSD: src/etc/periodic/daily/405.status-ata-raid,v 1.1 2003/10/27 20:14:53 jesper Exp $ # # 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_ata_raid_enable" in [Yy][Ee][Ss]) echo echo 'Checking status of ATA raid partitions:' eval arlist=\$daily_status_ata_raid_ar_list rc=0 if [ "X$arlist" != "X" ]; then for raid in $arlist; do status=`/sbin/atacontrol status $raid` echo $status raid_rc=`echo $status | grep -v READY | wc -l` [ $rc -eq 0 ] && [ $raid_rc -gt 0 ] && rc=3 done else for raid in `find /dev/ -name 'ar[0-9]*' -type c | egrep '[0-9]$' \ | egrep -v 's[0-9]' | cut -d / -f 3` do status=`/sbin/atacontrol status $raid` echo $status raid_rc=`echo $status | grep -v READY | wc -l` [ $rc -eq 0 ] && [ $raid_rc -gt 0 ] && rc=3 done fi ;; *) rc=0;; esac exit $rc >Release-Note: >Audit-Trail: >Unformatted: