Bug#284788: [Logcheck-devel] Bug#284788: logcheck: Installs cron.d file before creating user causing cron to complain

Eric Evans eevans at sym-link.com
Fri Dec 31 18:35:57 UTC 2004


On Thu, Dec 30, 2004 at 01:33:49AM -0500, Todd Troxell muttered these words:
> On Wed, Dec 29, 2004 at 10:20:44PM -0600, Eric Evans wrote:
> > On Tue, Dec 28, 2004 at 03:42:21AM -0500, Todd Troxell muttered these words:
> > > On Wed, Dec 08, 2004 at 11:32:49AM -0800, Jefferson Cowart wrote:
> > > > After installing logcheck on my system last night I did not recieve any
> > > > reports. Upon checking the logs I found that the logcheck file had been
> > > > copied into /etc/cron.d before adduser had been run. Cron picked up the
> > > > new file and then complained that the user was invalid. Relevant log
> > > > lines below. I just restarted cron which I believe has fixed the issue.
> > > > Perhaps this can be fixed by copying the file in postinst after the user
> > > > has been created.
> > > 
> > > Thanks for the report.
> > > 
> > > The cron jobs are now commented by default, and postinst enables them.  This
> > > should solve your problem.
> > > 
> > > The fix is in CVS.
> > 
> > /etc/cron.d/logcheck is a conffile, are we allowed, (read: policy), to
> > modify it during post-install? 
> > 
> > This seems similar to what happened with bugs #222240 and #226937, (now 
> > archived), that requested the ability to select a cron interval via 
> > debconf. I committed code to do just that before someone pointed out that
> > is was a conffile and shouldn't be modified by the maintainer scripts, 
> > (we subsequently rolled it back out).
> 
> Crap, I forgot about this.  The other solution is to pre-depend on adduser
> and adduser in preinst, but this requires consent from -devel.  I guess I'll
> ask around if there are no other ideas.

FWIW, this sounds like it is probably the best way to go about it.

The only other option that comes to mind is touching /etc/cron.d/logcheck
during postinst after adding the user. This would be enough to make sure 
our crontab gets (re)loaded *after* the user has been added. The timestamp
would be different from what's in the package, but the md5sum would be the
same. I wonder if this still constitutes modification.

-- 
Eric Evans
eevans at sym-link.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/logcheck-devel/attachments/20041231/b60f79da/attachment.pgp 


More information about the Logcheck-devel mailing list