From owner-freebsd-bugs@FreeBSD.ORG Wed Mar 7 14:20:15 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B0F11065675 for ; Wed, 7 Mar 2012 14:20:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 043198FC12 for ; Wed, 7 Mar 2012 14:20:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q27EKEPE032241 for ; Wed, 7 Mar 2012 14:20:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q27EKEPJ032240; Wed, 7 Mar 2012 14:20:14 GMT (envelope-from gnats) Resent-Date: Wed, 7 Mar 2012 14:20:14 GMT Resent-Message-Id: <201203071420.q27EKEPJ032240@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, Volodymyr Kostyrko Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8ED3E106566C for ; Wed, 7 Mar 2012 14:18:28 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 6F6D98FC16 for ; Wed, 7 Mar 2012 14:18:28 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q27EISRh085564 for ; Wed, 7 Mar 2012 14:18:28 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q27EISnj085563; Wed, 7 Mar 2012 14:18:28 GMT (envelope-from nobody) Message-Id: <201203071418.q27EISnj085563@red.freebsd.org> Date: Wed, 7 Mar 2012 14:18:28 GMT From: Volodymyr Kostyrko To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: conf/165817: /etc/periodic reports misconfiguration when it shouldn't 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: Wed, 07 Mar 2012 14:20:15 -0000 >Number: 165817 >Category: conf >Synopsis: /etc/periodic reports misconfiguration when it shouldn't >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Mar 07 14:20:14 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Volodymyr Kostyrko >Release: RELENG_9 >Organization: None >Environment: FreeBSD green.tandem.local 9.0-STABLE FreeBSD 9.0-STABLE #0 r232540: Mon Mar 5 13:52:59 EET 2012 arcade@green.tandem.local:/usr/obj/usr/src/sys/MINIMAL_4BSD amd64 >Description: Periodic 999.local scripts reports misconfiguration if they fail to find /etc/*.local file. However the absence of this file is not misconfiguration but is rather an option to specify local configuration additions in netboot environment. After that if anyone sets: *_show_badconfig=yes *_show_success=no The minimal mail would be emailed anyway regardless of other tasks: /etc/*.local: No such file -- End of * output -- Attached patch fixes this by not modifying `rc` when `*.local` file is not found. Generated output remains the same and the only change would be not generating mail when `*.local` file is not found locally. >How-To-Repeat: >Fix: Patch attached with submission follows: diff -urN /etc/periodic/daily/999.local ./daily/999.local --- /etc/periodic/daily/999.local 2011-12-28 11:17:21.420664000 +0200 +++ ./daily/999.local 2012-03-07 16:04:19.722599521 +0200 @@ -27,7 +27,6 @@ sh $script || rc=3 else echo "$script: No such file" - [ $rc -lt 2 ] && rc=2 fi;; *) echo "$script: Not an absolute path" diff -urN /etc/periodic/monthly/999.local ./monthly/999.local --- /etc/periodic/monthly/999.local 2011-12-28 11:17:21.467664000 +0200 +++ ./monthly/999.local 2012-03-07 16:04:26.617599427 +0200 @@ -24,7 +24,6 @@ sh $script || rc=3 else echo "$script: No such file" - [ $rc -lt 2 ] && rc=2 fi;; *) echo "$script: Not an absolute path" diff -urN /etc/periodic/periodic.silence.patch ./periodic.silence.patch --- /etc/periodic/periodic.silence.patch 1970-01-01 03:00:00.000000000 +0300 +++ ./periodic.silence.patch 2012-03-07 16:09:23.287599845 +0200 @@ -0,0 +1,22 @@ +diff -urN /etc/periodic/daily/999.local ./daily/999.local +--- /etc/periodic/daily/999.local 2011-12-28 11:17:21.420664000 +0200 ++++ ./daily/999.local 2012-03-07 16:04:19.722599521 +0200 +@@ -27,7 +27,6 @@ + sh $script || rc=3 + else + echo "$script: No such file" +- [ $rc -lt 2 ] && rc=2 + fi;; + *) + echo "$script: Not an absolute path" +diff -urN /etc/periodic/monthly/999.local ./monthly/999.local +--- /etc/periodic/monthly/999.local 2011-12-28 11:17:21.467664000 +0200 ++++ ./monthly/999.local 2012-03-07 16:04:26.617599427 +0200 +@@ -24,7 +24,6 @@ + sh $script || rc=3 + else + echo "$script: No such file" +- [ $rc -lt 2 ] && rc=2 + fi;; + *) + echo "$script: Not an absolute path" diff -urN /etc/periodic/weekly/999.local ./weekly/999.local --- /etc/periodic/weekly/999.local 2011-12-28 11:17:21.452664000 +0200 +++ ./weekly/999.local 2012-03-07 16:04:44.751599176 +0200 @@ -24,7 +24,6 @@ sh $script || rc=3 else echo "$script: No such file" - [ $rc -lt 2 ] && rc=2 fi;; *) echo "$script: Not an absolute path" >Release-Note: >Audit-Trail: >Unformatted: