Handle odd logrotate version string

This commit is contained in:
Jamie Cameron
2010-06-19 13:56:16 -07:00
parent c8516b7f84
commit 751f442ebb

View File

@@ -174,7 +174,8 @@ sub get_logrotate_version
{
local $out = &backquote_command("$config{'logrotate'} -v 2>&1", 1);
${$_[0]} = $out if ($_[0]);
return $out =~ /logrotate\s+([0-9\.]+)\s/ ? $1 : undef;
return $out =~ /logrotate\s+([0-9\.]+)\s/ ||
$out =~ /logrotate\-([0-9\.]+)\s/ ? $1 : undef;
}
# get_period(&conf)