aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2010-02-18 19:17:56 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2010-02-18 19:17:56 +0000
commit7801d32ec444a175ef5bf1beedff48b37df2aea2 (patch)
treeeb89384fab72e77993cf15336e74602bd59ff6c2 /src
parent6be45f9ba30d89a3f207aa5285acd781bbb68320 (diff)
downloadmsec-7801d32ec444a175ef5bf1beedff48b37df2aea2.tar
msec-7801d32ec444a175ef5bf1beedff48b37df2aea2.tar.gz
msec-7801d32ec444a175ef5bf1beedff48b37df2aea2.tar.bz2
msec-7801d32ec444a175ef5bf1beedff48b37df2aea2.tar.xz
msec-7801d32ec444a175ef5bf1beedff48b37df2aea2.zip
Properly handle log retention
Diffstat (limited to 'src')
-rw-r--r--src/msec/plugins/log.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/msec/plugins/log.py b/src/msec/plugins/log.py
index 8f11e72..2749263 100644
--- a/src/msec/plugins/log.py
+++ b/src/msec/plugins/log.py
@@ -42,13 +42,13 @@ class log:
try:
retention = int(arg)
except:
- self.log.error(_('Invalid maximum password history length: "%s"') % arg)
+ self.log.error(_('Invalid retention period: "%s"') % arg)
return
logrotate = self.configfiles.get_config_file(self.LOGROTATE)
- val = logrotate.get_match(self.LOGROTATE_ROTATE)
+ val = logrotate.get_match(self.LOGROTATE_ROTATE, '@1')
- if val != retention:
+ if val != arg:
self.log.info(_("Setting log retention period to %d weeks") % retention)
logrotate.replace_line_matching(self.LOGROTATE_ROTATE, ("rotate %d" % retention))