summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-06 17:21:07 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-06 17:21:07 -0700
commitcabb370ecbc56b2721c6b17f7863258f0798eaca (patch)
tree581b47b2c15d7aaff1d379c876f9b1161b3de83c
parent8ddb46697ada893f5b92c0a18adc4b86eec409a3 (diff)
parentc412935a4a66cbdc26d7a8a24a17621612eafc9e (diff)
downloadvyatta-cfg-quagga-cabb370ecbc56b2721c6b17f7863258f0798eaca.tar.gz
vyatta-cfg-quagga-cabb370ecbc56b2721c6b17f7863258f0798eaca.zip
Merge branch 'jenner' of 192.168.100.1:git/vyatta-cfg-system into jenner
-rwxr-xr-xscripts/system/vyatta_update_syslog.pl11
-rw-r--r--templates/system/syslog/console/facility/node.def4
-rw-r--r--templates/system/syslog/file/node.tag/facility/node.def4
-rw-r--r--templates/system/syslog/global/facility/node.def4
-rw-r--r--templates/system/syslog/host/node.tag/facility/node.def4
-rw-r--r--templates/system/syslog/user/node.tag/facility/node.def4
6 files changed, 19 insertions, 12 deletions
diff --git a/scripts/system/vyatta_update_syslog.pl b/scripts/system/vyatta_update_syslog.pl
index 49662c30..83fa9576 100755
--- a/scripts/system/vyatta_update_syslog.pl
+++ b/scripts/system/vyatta_update_syslog.pl
@@ -43,6 +43,12 @@ sub add_entry {
push @{ $entries{$target} }, $selector;
}
+# This allows overloading local values in CLI
+my %facmap = (
+ 'all' => '*',
+ 'protocols' => 'local7',
+);
+
# This builds a data structure that maps from target
# to selector list for that target
sub read_config {
@@ -50,7 +56,7 @@ sub read_config {
foreach my $facility ( $config->listNodes("$level facility") ) {
my $loglevel = $config->returnValue("$level facility $facility level");
- $facility = '*' if ( $facility eq 'all' );
+ $facility = $facmap{$facility} if ( $facmap{$facility} );
$loglevel = '*' if ( $loglevel eq 'all' );
add_entry( $facility . '.' . $loglevel, $target );
@@ -84,7 +90,8 @@ foreach my $user ( $config->listNodes('user') ) {
if ( -r $SYSLOG_CONF ) {
system("sed -e '/$BEGIN_VYATTA/,/$END_VYATTA/d' <$SYSLOG_CONF >$SYSLOG_TMP")
- == 0 or die "Can't read $SYSLOG_CONF";
+ == 0
+ or die "Can't read $SYSLOG_CONF";
}
open my $out, '>>', $SYSLOG_TMP
diff --git a/templates/system/syslog/console/facility/node.def b/templates/system/syslog/console/facility/node.def
index 4a565f6e..98b207d5 100644
--- a/templates/system/syslog/console/facility/node.def
+++ b/templates/system/syslog/console/facility/node.def
@@ -1,7 +1,7 @@
tag:
type: txt
help: Set facility for console logging
-syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility"
+syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "protocols", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility"
comp_help:Available logging facilities:
all All facilities excluding "mark"
auth Authentication and authorization
@@ -13,6 +13,7 @@ comp_help:Available logging facilities:
mail Mail subsystem
mark Timestamp
news USENET subsystem
+ protocols Routing protocols (local7)
security Authentication and authorization
syslog Authentication and authorization
user Application processes
@@ -24,4 +25,3 @@ comp_help:Available logging facilities:
local4 Local facility 4
local5 Local facility 5
local6 Local facility 6
- local7 Local facility 7
diff --git a/templates/system/syslog/file/node.tag/facility/node.def b/templates/system/syslog/file/node.tag/facility/node.def
index f793e9b4..37188925 100644
--- a/templates/system/syslog/file/node.tag/facility/node.def
+++ b/templates/system/syslog/file/node.tag/facility/node.def
@@ -1,7 +1,7 @@
tag:
type: txt
help: Set facility for file logging
-syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility"
+syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "protocols", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility"
comp_help:Available logging facilities:
all All facilities excluding "mark"
auth Authentication and authorization
@@ -13,6 +13,7 @@ comp_help:Available logging facilities:
mail Mail subsystem
mark Timestamp
news USENET subsystem
+ protocols Routing protocols (local7)
security Authentication and authorization
syslog Authentication and authorization
user Application processes
@@ -24,4 +25,3 @@ comp_help:Available logging facilities:
local4 Local facility 4
local5 Local facility 5
local6 Local facility 6
- local7 Local facility 7
diff --git a/templates/system/syslog/global/facility/node.def b/templates/system/syslog/global/facility/node.def
index 0616179f..bc8c094a 100644
--- a/templates/system/syslog/global/facility/node.def
+++ b/templates/system/syslog/global/facility/node.def
@@ -1,7 +1,7 @@
tag:
type: txt
help: Set facility for system logging
-syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all" ; "\"$VAR(@)\" is not a valid logging facility"
+syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "protocols", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all" ; "\"$VAR(@)\" is not a valid logging facility"
comp_help:Available logging facilities:
all All facilities excluding "mark"
auth Authentication and authorization
@@ -13,6 +13,7 @@ comp_help:Available logging facilities:
mail Mail subsystem
mark Timestamp
news USENET subsystem
+ protocols Routing protocols (local7)
security Authentication and authorization
syslog Authentication and authorization
user Application processes
@@ -24,4 +25,3 @@ comp_help:Available logging facilities:
local4 Local facility 4
local5 Local facility 5
local6 Local facility 6
- local7 Local facility 7
diff --git a/templates/system/syslog/host/node.tag/facility/node.def b/templates/system/syslog/host/node.tag/facility/node.def
index ba18add0..d5f6ef9b 100644
--- a/templates/system/syslog/host/node.tag/facility/node.def
+++ b/templates/system/syslog/host/node.tag/facility/node.def
@@ -1,7 +1,7 @@
tag:
type: txt
help: Set facility for host logging
-syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility"
+syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "protocols", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility"
comp_help:Available logging facilities:
all All facilities excluding "mark"
auth Authentication and authorization
@@ -13,6 +13,7 @@ comp_help:Available logging facilities:
mail Mail subsystem
mark Timestamp
news USENET subsystem
+ protocols Routing protocols (local7)
security Authentication and authorization
syslog Authentication and authorization
user Application processes
@@ -24,4 +25,3 @@ comp_help:Available logging facilities:
local4 Local facility 4
local5 Local facility 5
local6 Local facility 6
- local7 Local facility 7
diff --git a/templates/system/syslog/user/node.tag/facility/node.def b/templates/system/syslog/user/node.tag/facility/node.def
index 0d323521..91a3f2a6 100644
--- a/templates/system/syslog/user/node.tag/facility/node.def
+++ b/templates/system/syslog/user/node.tag/facility/node.def
@@ -1,7 +1,7 @@
tag:
type: txt
help: Set facility for user logging
-syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility"
+syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "protocols", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility"
comp_help:Available logging facilities:
all All facilities excluding "mark"
auth Authentication and authorization
@@ -13,6 +13,7 @@ comp_help:Available logging facilities:
mail Mail subsystem
mark Timestamp
news USENET subsystem
+ protocols Routing protocols (local7)
security Authentication and authorization
syslog Authentication and authorization
user Application processes
@@ -24,4 +25,3 @@ comp_help:Available logging facilities:
local4 Local facility 4
local5 Local facility 5
local6 Local facility 6
- local7 Routing Daemons