Broken paths in startup script and config file

Bug #477510 reported by Ross Golder
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
amavis-stats (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: amavis-stats

root@red:~# lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10
root@red:~# getent passwd amavis-stats
root@red:~# apt-get install amavis-stats
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  amavis-stats
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/202kB of archives.
After this operation, 631kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package amavis-stats.
(Reading database ... 36609 files and directories currently installed.)
Unpacking amavis-stats (from .../amavis-stats_0.1.22-1_all.deb) ...
Processing triggers for man-db ...
Setting up amavis-stats (0.1.22-1) ...
adduser: Warning: The home directory `/var/lib/amavis-stats' does not belong to the user you are currently creating.

root@red:~# getent passwd amavis-stats
amavis-stats:x:112:4::/var/lib/amavis-stats:/bin/false
root@red:~# cat /etc/cron.d/amavis-stats
#
# cron job for the amavis-stats package
#
MAILTO=root
*/5 * * * * amavis-stats [ -x /usr/sbin/amavis-stats ] && /usr/sbin/amavis-stats /var/log/mail.info

root@red:~# sudo -H -u amavis-stats [ -x /usr/sbin/amavis-stats ] && /usr/sbin/amavis-stats /var/log/mail.info
Config file "/etc/amavis-stats.conf" does not exist, at /usr/sbin/amavis-stats line 225.

(...edit amavis-stats line 1120, set config_file to '/etc/amavis-stats/amavis-stats.conf'...)

root@red:~# sudo -H -u amavis-stats [ -x /usr/sbin/amavis-stats ] && /usr/sbin/amavis-stats /var/log/mail.info
Amavis-Stats-0.1.22 (2006-01-12): Unknown Argument Usage:
 Amavis-Stats [-u user] [-g group] [-c config-file] ( [start] | stop | reload | debug | foreground )

Looks to me like it's designed to run as a daemon, but has been packaged to run as a regular cron job for some reason. Anyway, I'm confused about which way to take it.

Revision history for this message
Paul Kerrigan (k-launchpad-infosectech-com) wrote :

Agreed. however, rolling back to the Jaunty version of Amavis-Stats provides an interim solution for me.

Revision history for this message
Martijn Heemels (yggdrasil) wrote :

Agreed, downgrading to 0.1.12-10 works as a workaround.
Does anyone know a permanent solution?

Revision history for this message
rat (rat-venus) wrote :

Just do a symbolic link of the Config file to the wright path.

ln /etc/amavis-stats/amavis-stats.conf /etc/ -s

Revision history for this message
MonkZ (monkz) wrote :

I've looked at the code closer, and make it run as a cron is definitely wrong. Should be a service.

Changed in amavis-stats (Ubuntu):
status: New → Confirmed
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.