diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-06 16:47:46 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-06 17:19:29 -0700 |
commit | 93fcb8164f1b86b43ed7cb3cb65f2d634a46b1c5 (patch) | |
tree | 2d7d996e5d333bec9828c0bdff77ba301ff7ea35 /scripts/system | |
parent | 3591ae5310a40b457baecde3ab1b06182893f25b (diff) | |
download | vyatta-cfg-system-93fcb8164f1b86b43ed7cb3cb65f2d634a46b1c5.tar.gz vyatta-cfg-system-93fcb8164f1b86b43ed7cb3cb65f2d634a46b1c5.zip |
Allow specifying 'protocols' for syslog facility
Since quagga uses local7, make it a real facility.
Allow local7 for compatiablity.
Bug 4263
Diffstat (limited to 'scripts/system')
-rwxr-xr-x | scripts/system/vyatta_update_syslog.pl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/system/vyatta_update_syslog.pl b/scripts/system/vyatta_update_syslog.pl index 49662c30..534c9b77 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,8 +56,8 @@ sub read_config { foreach my $facility ( $config->listNodes("$level facility") ) { my $loglevel = $config->returnValue("$level facility $facility level"); - $facility = '*' if ( $facility eq 'all' ); - $loglevel = '*' if ( $loglevel eq 'all' ); + $facility = $facmap{$facility} if ( $facmap{$facility} ); + $loglevel = '*' if ( $loglevel eq 'all' ); add_entry( $facility . '.' . $loglevel, $target ); } |