Incorrect parameter in the fwlogwatch cron script (Ubuntu 14.04 and 16.04)

Bug #1611756 reported by Jonas Holmgren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
fwlogwatch (Ubuntu)
New
Undecided
Unassigned

Bug Description

The name of the variable $CRON_PARAMS used as a parameter in the daily cron script does not match the variable $PARAMS defined in /etc/default/fwlogwatch. So either of them need to be changed.

/etc/cron.daily/fwlogwatch:
FWLOGWATCH=/usr/sbin/fwlogwatch
CONFIG=/etc/default/fwlogwatch
. $CONFIG
OUTPUT=`$FWLOGWATCH $CRON_PARAMS`

/etc/default/fwlogwatch:
PARAMS=''

Furthermore, as of now the cron script is ridiculously inadequate. fwlogwatch is quite by default, so why make the sending of (in effect) an empty email a condition for running fwlogwatch?

If this is not true:

if [ "$CRON_EMAIL" = "none" ]; then
  exit 0
fi

send an empty email with the subject "fwlogwatch daily news".

I suggest you remove this condition and replace the last 20 lines of the cron script with an 'exit 0' statement. The actual report will be sent anyway, namely to the recipient defined in /etc/fwlogwatch/fwlogwatch.config .

Finally, I suggest you include the minimum required parameters in /etc/default/fwlogwatch:
CRON_PARAMS='-c /etc/fwlogwatch/fwlogwatch.config'

Tags: fwlogwatch
affects: lightdm → fwlogwatch (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.