Hi Daniel,

Daniel Jakots wrote on Fri, Oct 02, 2020 at 02:16:57PM -0400:
> On Fri, 2 Oct 2020 19:55:53 +0200, Ingo Schwarze wrote:
>> Daniel Jakots wrote on Thu, Oct 01, 2020 at 10:32:31PM -0400:

>>> Currently daily(8) runs `df -ikl`.  

>> By default, it does not.  It only does that if you set VERBOSESTATUS.

> Are you sure? It looks like it does not, *if* you set VERBOSESTATUS to
> 0. (And that's what daily(8) says as well).

Sorry for misremebering this and for not checking it before i posted.
You are right.

>> I would prefer deleting the VERBOSESTATUS parts completely,
>> strictly enforcing the principle "daily(8) only produces output
>> when something unexpected happens", and tell people to use
>> daily.local(8) if they want to run df or netstat.  The code
>> for those two parts is totally trivial and riddled with
>> choices that look like personal preferences, like the one
>> you suggest to change.

> I agree, that would a better change indeed. I think I'll fix my
> problem by setting VERBOSESTATUS to 0 and add what I want to my
> daily.local.
 
>> I dimly remember that some developers wanted to keep VERBOSESTATUS,
>> though (i might misremember), so we'll probably keep it.  If we
>> keep it, i absolutely don't care what it does.  So i'll neither OK
>> this nor object to it.

> Anyone cares about this one way or the other? Here's a diff for it. (If
> we want to go this way, I'll craft a diff for current.html as well).

I certainly like this, and it works for me.

But i think a change like this would need more than one OK,
and you should wait some days such that developers can raise
objections.

Just in case you get sufficient OKs and there are no serious
objections, see below for two suggested tweaks.

Yours,
  Ingo


> Index: ./share/man/man8/daily.8
> ===================================================================
> RCS file: /cvs/src/share/man/man8/daily.8,v
> retrieving revision 1.28
> diff -u -p -r1.28 daily.8
> --- ./share/man/man8/daily.8  26 Jul 2020 13:27:24 -0000
> 1.28 +++ ./share/man/man8/daily.8     2 Oct 2020 18:12:39 -0000
> @@ -205,15 +205,6 @@ If set to 1, run
>  with the no-write flag.
>  .It Ev ROOTBACKUP
>  If set to 1, make a backup of the root file system.
> -.It Ev VERBOSESTATUS
> -If set to 0,
> -.Xr df 1 ,
> -.Xr dump 8 ,
> -and
> -.Xr netstat 1
> -are skipped.
> -Consequently, if none of the other commands produce any output,
> -no mail will be sent to root.
>  .El
>  .Pp
>  The following variables can be set in

The following would also have to go:

 * part of the list item "Checks disk status"
 * the list item "Reports networking statistics"
 * df(1) and netstat(1) in SEE ALSO

> Index: etc/daily
> ===================================================================
> RCS file: /cvs/src/etc/daily,v
> retrieving revision 1.93
> diff -u -p -r1.93 daily
> --- etc/daily 9 Sep 2019 20:02:26 -0000       1.93
> +++ etc/daily 2 Oct 2020 18:12:39 -0000
> @@ -137,20 +137,7 @@ next_part "Services that should be runni
>  rcctl ls failed
>  
>  next_part "Checking subsystem status:"

This output line should probably be updated, maybe something like:

   next_part "Backing up filesystems with dump:"

> -if [ "X$VERBOSESTATUS" != X0 ]; then
> -     echo ""
> -     echo "disks:"
> -     df -ikl
> -     echo ""
> -     dump W
> -else
> -     dump w | grep -vB1 ^Dump
> -fi
> -
> -next_part "network:"
> -if [ "X$VERBOSESTATUS" != X0 ]; then
> -     netstat -ivn
> -fi
> +dump w | grep -vB1 ^Dump
>  
>  next_part "Running calendar in the background:"
>  if [ "X$CALENDAR" != X0 -a \

Reply via email to