Failed to get the version of logrotate

Failed to get the version of logrotate with the command /usr/sbin/logrotate -v :

logrotate logrotate-3.7.1 - Copyright (C) 1995-2001 Red Hat, Inc. This may be freely redistributed under the terms of the GNU Public License

Usage: logrotate [-d|--debug] [-f|--force] [-m|--mail command] [-s|--state statefile] [-v|--verbose] [-?|--help] [--usage] [OPTION...]

I installed logrotate from http://pkg.opensolaris.org/dev/manifest/0/system%2Ffile%2Flogrotate%403....

Status: 
Closed (fixed)

Comments

Looks like your logrotate command is outputting the version in an odd format..

The fix is to edit /opt/webmin/logrotate/logrotate-lib.pl and change like 177 from :

return $out =~ /logrotate\s+([0-9\.]+)\s/ ? $1 : undef;

to :

return $out =~ /logrotate\-([0-9\.]+)\s/ ? $1 : undef;

I will fix this properly in the next Webmin release (1.520).

Thanks for the quick reply! That solved the problem!

Automatically closed -- issue fixed for 2 weeks with no activity.