From 0d350f88e17ef2c4e467614efc5b7ae24b51678f Mon Sep 17 00:00:00 2001 From: Mike Hibler <mike@flux.utah.edu> Date: Mon, 25 Oct 2004 23:37:53 +0000 Subject: [PATCH] In syslog.conf, exclude testbed messages from going to /dev/console too. --- install/boss-install.in | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/install/boss-install.in b/install/boss-install.in index 800dd39b94..f0e1ef374b 100644 --- a/install/boss-install.in +++ b/install/boss-install.in @@ -427,7 +427,8 @@ Phase "syslog", "Setting up syslog", sub { DoneIfEdited($SYSLOG_CONF); # - # Modify the /var/log/messages line to exclude testbed stuff + # Modify the /dev/console and /var/log/messages lines to exclude + # testbed stuff # open(SC,"+<$SYSLOG_CONF") or PhaseFail("Unable to open $SYSLOG_CONF : $!"); @@ -438,9 +439,13 @@ Phase "syslog", "Setting up syslog", sub { seek(SC,0,0); truncate(SC,0); foreach my $line (@sc) { - my $pat = q(\s+/var/log/messages); - if ($line =~ /^[^#].*$pat/) { - $line =~ s/($pat)/\;$LOGFACIL.none$1/; + my $cpat = q(\s+/dev/console); + my $mpat = q(\s+/var/log/messages); + if ($line =~ /^[^#].*$cpat/) { + $line =~ s/($cpat)/\;$LOGFACIL.none$1/; + } + elsif ($line =~ /^[^#].*$mpat/) { + $line =~ s/($mpat)/\;$LOGFACIL.none$1/; } print SC $line; } -- GitLab