Daily, weekly, security scripts....

Gary Palmer gpalmer at freebsd.org
Thu May 24 15:47:00 UTC 2012


On Thu, May 24, 2012 at 03:29:49PM +0200, Willem Jan Withagen wrote:
> On 2012-05-24 14:01, Sergey Kandaurov wrote:
> > On 24 May 2012 11:49, Willem Jan Withagen <wjw at digiware.nl> wrote:
> >> [I looked for a better list to drop this on, but other that freebsd-rc
> >> nothing seems close.]
> >>
> >> Hi,
> >>
> >> I nagged about the verbosity of the periodic scripts.
> >> But did not give any example.
> 
> [example stripped]
> 
> >> This would call for something like $periodic_quiet??
> >> and then generating the headers only if there was something to report.
> 
> 
> > Hi,
> > you could try to start with:
> > 
> > security_show_success="NO"
> > daily_show_success="NO"
> 
> I looked in some of the security scripts and that variable is not used
> in the ones I looked into.
> 
> But perhaps in script/tools that does the overall calling of the
> /etc/periodic/security/* scripts.

Its handled in /usr/sbin/periodic

    success=YES info=YES badconfig=NO empty_output=YES  # Defaults when ${run}_* aren't YES/NO
    for var in success info badconfig empty_output
    do
        case $(eval echo "\$${arg##*/}_show_$var") in
        [Yy][Ee][Ss]) eval $var=YES;;
        [Nn][Oo])     eval $var=NO;;
        esac
    done

Regards,

Gary


More information about the freebsd-current mailing list