Re: periodic emails

From: Garrett Cooper <yanegomi_at_gmail.com>
Date: Mon, 2 Jan 2012 17:19:12 -0800
On Mon, Jan 2, 2012 at 2:51 PM, Doug Barton <dougb_at_freebsd.org> wrote:
> On 01/02/2012 14:49, Garrett Cooper wrote:
>> On Mon, Jan 2, 2012 at 2:45 PM, Doug Barton <dougb_at_freebsd.org> wrote:
>>> On 01/02/2012 14:14, Garrett Cooper wrote:
>>>
>>>>     How does this look for starters? The attached patch's goal is to
>>>> provide a generic, rc(5)-like infrastructure that would quiet down the
>>>> periodic emails for 120.clean-preserve .
>>>
>>> The periodic scripts are badly in need of attention, so effort in that
>>> area is much appreciated.
>>>
>>> Regarding your patch, rather than copying functions from rc.subr, why
>>> not just source it? Yes, you will get more than you need, but I think
>>> that the virtue of not having to maintain the same code in 2 places far
>>> outweighs that minor drawback.
>>
>>     That works too, assuming that rc.subr isn't too rc(5) centric.
>
> Well of course it's rc-centric, but that's not the point. :)  If you're
> going to be using the exact same code from rc.subr, you might as well
> just source it. The things that you'll get by doing that which are only
> relevant to rc you just ignore.
>
>> Thanks for the feedback!
>
> Glad to help.

    Here's a patch (untested apart from sh -n, but I'm going to toss
it into a VM to watch the sparks fly), based on stable/9 that makes
periodic(5) a bit more like rc(5).
    Apart from that it resolves some inconsistencies with
800.zfs-scrub (the defaults were in the script and not
/etc/defaults/periodic.conf), removes duplicate rc=0 declarations,
consolidates and generalizes the "catmsgs" function, catches more
errors, and some other good stuff.
Thanks!
-Garrett

Received on Tue Jan 03 2012 - 00:19:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:22 UTC