From owner-freebsd-bugs@FreeBSD.ORG Mon May 7 15:40:09 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EB05F106566C for ; Mon, 7 May 2012 15:40:09 +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 CBBBB8FC14 for ; Mon, 7 May 2012 15:40:09 +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 q47Fe9J2032301 for ; Mon, 7 May 2012 15:40:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q47Fe9kU032300; Mon, 7 May 2012 15:40:09 GMT (envelope-from gnats) Date: Mon, 7 May 2012 15:40:09 GMT Message-Id: <201205071540.q47Fe9kU032300@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: John Baldwin Cc: Subject: Re: conf/165817: [periodic] [patch] /etc/periodic reports misconfiguration when it shouldn' t X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John Baldwin List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 May 2012 15:40:10 -0000 The following reply was made to PR conf/165817; it has been noted by GNATS. From: John Baldwin To: bug-followup@freebsd.org, c.kworr@gmail.com Cc: Subject: Re: conf/165817: [periodic] [patch] /etc/periodic reports misconfiguration when it shouldn't Date: Mon, 7 May 2012 11:15:28 -0400 This doesn't make sense. The various variables don't have a default value in /etc/defaults/rc.conf (e.g. daily_local), so they should just be empty, and the for loop should not do anything if the variable is empty. For example, if you run this in /bin/sh: $ for script in $notexists > do > echo foo > done $ You don't get any output at all. Thus, having the default configuration of not having these variables set should never get into the loop to execute the line you are modifying. In your case you must have daily_local, etc. set to some absolute path that doesn't exist (e.g. daily_local="/nonexistent") in which case that is a misconfiguration that the scripts should warn you about. Or is the problem that you have daily_local set to "/etc/*.local" (the glob) and that isn't matching, so the shell runs the loop with the value "/etc/*.local"? That is a bit harder to fix. Your patch would not be correct if someone set "daily_local" to "/nonexistent". That is a case that _should_ be warned about. -- John Baldwin