Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 May 2012 15:40:09 GMT
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: conf/165817: [periodic] [patch] /etc/periodic reports misconfiguration when it shouldn&#39; t
Message-ID:  <201205071540.q47Fe9kU032300@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/165817; it has been noted by GNATS.

From: John Baldwin <jhb@freebsd.org>
To: bug-followup@freebsd.org,
 c.kworr@gmail.com
Cc:  
Subject: Re: conf/165817: [periodic] [patch] /etc/periodic reports misconfiguration when it shouldn&#39;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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205071540.q47Fe9kU032300>