Bug#281646: [Logcheck-devel] Bug#281646: bug in logtail regarding command line options

maks attems debian at sternwelten.at
Thu Nov 18 03:41:29 UTC 2004


On Wed, 17 Nov 2004, john at interflora.com.au wrote:

> We have recently upgraded a machine, and a number of scripts stopped 
> working.
> It appears that the way logtail(8) parses its command line has changed.
yup,
the argument parsing changed,
scripts using logtail must use the argument switch for the logfile
and the offsetfile.

> I do not know if this change occurred during the reimplementation from C to 
> perl
> (why was that done?  I would have thought that since C is generally both 
> more portable and faster, and since the C was already written, it would be 
> the preferred implementation?  *shrug*)
> or at some other time.
well the reimplementation in perl was done before the new logcheck team
took over. the logcheck package in woody already carries the "new"
logtail, but the script apparently still uses the c version.
anyway this logtail doesn't look that hard to reimplement.
but we won't consider this for sarge.

Perl is quite portable and is in the debian base, beside this it works
on a far nr. of machines.

from changelog for logcheck (1.1.1-11) on 25 Nov 2001
* Do not use logtail.c from the original logcheck package anymore, but a
  perl version by Paul Slootman. This makes the package architecture
  independent.
  Closes: #89614

bugreporter complains to have to compile logtail on "solaris, hp/ux,
etc systems,"

 
> The script fails on a command as follows:
> 
> /usr/sbin/logtail /var/log/kern.log /var/local/log_state
> 
> 
> It gives the following output:
> 
> No logfile to read. Use -f switch.
that's correct. 
> I note that the -f switch is no longer in brackets on the man page, 
> indicating that the author of the man page believes this switch to be 
> mandatory.  In previous versions, this switch was optional.  I suspect that 
> the man page was wrong, and now the utility has been reimplemented to match 
> the man page, thus breaking scripts which previously worked.

thanks for your hint, 
no the author is a morron when having to deal with manpages.

so the manpge shouldn't have brackets around the -o switch,
but brackets around the -f switch?
strange in normal life i always considered to put unimportant stuff
under brackets or whatever.
 
> I have not included kernel or hardware information (as requested in 
> http://www.debian.org/Bugs/Reporting) since I do not think that they are 
> relevant.

agreed.

--
maks






More information about the Logcheck-devel mailing list