Date: Wed, 7 Mar 2012 14:18:28 GMT From: Volodymyr Kostyrko <c.kworr@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: conf/165817: /etc/periodic reports misconfiguration when it shouldn't Message-ID: <201203071418.q27EISnj085563@red.freebsd.org> Resent-Message-ID: <201203071420.q27EKEPJ032240@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203071418.q27EISnj085563>