aboutsummaryrefslogtreecommitdiffstats
path: root/share/libmsec.py
diff options
context:
space:
mode:
authorFrederic Lepied <flepied@mandriva.com>2002-02-15 05:19:17 +0000
committerFrederic Lepied <flepied@mandriva.com>2002-02-15 05:19:17 +0000
commitfe93f5b2415d1b7fd99551a88ea464c62b05865a (patch)
treef64862b891d0e37200ac0f430c2d9783dae67503 /share/libmsec.py
parentbcfc307ac4c6b78be142175d9b92ccee544bc467 (diff)
downloadmsec-fe93f5b2415d1b7fd99551a88ea464c62b05865a.tar
msec-fe93f5b2415d1b7fd99551a88ea464c62b05865a.tar.gz
msec-fe93f5b2415d1b7fd99551a88ea464c62b05865a.tar.bz2
msec-fe93f5b2415d1b7fd99551a88ea464c62b05865a.tar.xz
msec-fe93f5b2415d1b7fd99551a88ea464c62b05865a.zip
allow an extra arg to specify the log to do in enable_console_log
Diffstat (limited to 'share/libmsec.py')
-rw-r--r--share/libmsec.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/share/libmsec.py b/share/libmsec.py
index bcc3862..86ecd0f 100644
--- a/share/libmsec.py
+++ b/share/libmsec.py
@@ -351,16 +351,17 @@ def nopassword_loader():
menulst = ConfigFile.get_config_file(MENULST)
menulst.exists() and menulst.remove_line_matching('^password\s')
-def enable_console_log(arg):
- ''' Enable/Disable syslog reports to console 12.'''
+def enable_console_log(arg, expr='*.*'):
+ ''' Enable/Disable syslog reports to console 12. \\fIexpr\\fP is the
+expression describing what to log (see syslog.conf(5) for more details).'''
syslogconf = ConfigFile.get_config_file(SYSLOGCONF)
if arg:
_interactive and log(_('Enabling log on console 12'))
- syslogconf.exists() and syslogconf.replace_line_matching('\s*[^#]+/dev/tty12', '*.* /dev/tty12', 1)
+ syslogconf.exists() and syslogconf.replace_line_matching('\s*[^#]+/dev/tty12', expr + ' /dev/tty12', 1)
else:
_interactive and log(_('Disabling log on console 12'))
- syslogconf.exists() and syslogconf.remove_line_matching('\*\.\*\s*/dev/tty12')
+ syslogconf.exists() and syslogconf.remove_line_matching('\s*[^#]+/dev/tty12')
def enable_promisc_check(arg):
''' Activate/Disable ethernet cards promiscuity check.'''