can we have a quiet news.daily?

Julien ÉLIE julien at
Mon Nov 9 19:53:10 UTC 2009

Hi Florian,

>> However, I do not understand why you only change the scanlogs behaviour
>> in news.daily.
>> There is also innstat; unless you also use "nostat"?  but I do not think
>> it should be related to "nomail".
> well, that's right, I am running news.daily with "norenumber nostat
> nomail", and didn't look beyond my immediate issue. But I am not sure
> what you were trying to say / suggest?

My sentence was indeed very weird and, besides, wrong.
I wanted to suggest that "nomail" => "nostat", that is to say that innstat
should not be run by default with "nomail".

>> There are also issues with renumbering and postexec:
> This is true. Both preexec and renumbering will output something, and
> postexec is even worse, because its output will not be included in the
> news.daily mail but always mailed separately!

Oh, you're right.  I hadn't seen preexec programs (given at the end of
the news.daily command).

> I think the latter is a bug and postexec should be moved up to take
> place before mailing the report.

I also think so.  If postexec programs need to write a separate mail,
they should send the mail themselves.

> But would you think that making explanatory output depend on "nomail" /
> ${DOMAIL} is the right thing to do? Like so:
>> ##  Renumber the active file.
>> if ${DORENUMBER} ; then
>  +   if ${DOMAIL} ; then
>>      echo ''
>>      echo 'Renumbering active file.'
>  +  fi
>> ##  Run any user programs.
>> if [ -n "${PROGRAMS}" ] ; then
>>    for P in ${PROGRAMS} ; do
>  +     if ${DOMAIL} ; then
>>         echo ''
>>         echo "${P}:"
>  +     fi
>>      eval ${P}
>>    done
>> fi

I think that's fine:  not printing the two lines when "nomail" is used.
Programs are supplied by the user; he should take care
of the output of his programs (and eventually wrap them into a shell
which discards their output in case he does not want an output
from them), so that's fine for the eval outside the check.

> As long as news.daily is run from cron, this is probably what one would
> want (and certainly fine by me), but I wonder if we also need to take
> into account the case when news.daily is run interactively (like when
> cleaning up after a crash or data corruption), and the admin uses
> "nomail" to get immediate feedback instead of having to wait for the
> whole run to complete and the mail to arrive?

Well, hmmm...  "tail -f ${TEMP}" :)
but it works when "nomail" is *not* provided.

When "nomail" is provided, the output is still sent to files and there
is no immediate feedback.  The feature of having that immediate feedback
does not currently exist, does it?  Is it a real need?

>> We should check the correct definition of the variable first:
>> -    print "$Title from $first_date to $last_date\n\n";
>> +    print "$Title from $first_date to $last_date\n\n"
>> +      if ((defined $$h{'default'}{'text'})
>> +          and ($$h{'default'}{'text'} =~ m/^true$/io));
> You're right. I was mislead by the 'die "Error in config file. Field
> 'text' is mandatory.\n"' in Write_Results()...

The problem is that you could have every $$h{XXXX}{'text'} defined,
where XXXX is a subsection, but not the default one; and that error
will not be triggered off.
So better add the check here.

Julien ÉLIE

« Nunc est bibendum. » (Horace) 

More information about the inn-workers mailing list