diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-06 17:20:25 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-06 17:20:25 -0700 |
commit | c412935a4a66cbdc26d7a8a24a17621612eafc9e (patch) | |
tree | cfa95de9dfb5f61ee6c29e4412035a1c0b0da913 | |
parent | 93fcb8164f1b86b43ed7cb3cb65f2d634a46b1c5 (diff) | |
download | vyatta-cfg-system-c412935a4a66cbdc26d7a8a24a17621612eafc9e.tar.gz vyatta-cfg-system-c412935a4a66cbdc26d7a8a24a17621612eafc9e.zip |
Reindent syslog script
-rwxr-xr-x | scripts/system/vyatta_update_syslog.pl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/system/vyatta_update_syslog.pl b/scripts/system/vyatta_update_syslog.pl index 534c9b77..83fa9576 100755 --- a/scripts/system/vyatta_update_syslog.pl +++ b/scripts/system/vyatta_update_syslog.pl @@ -45,8 +45,8 @@ sub add_entry { # This allows overloading local values in CLI my %facmap = ( - 'all' => '*', - 'protocols' => 'local7', + 'all' => '*', + 'protocols' => 'local7', ); # This builds a data structure that maps from target @@ -56,8 +56,8 @@ sub read_config { foreach my $facility ( $config->listNodes("$level facility") ) { my $loglevel = $config->returnValue("$level facility $facility level"); - $facility = $facmap{$facility} if ( $facmap{$facility} ); - $loglevel = '*' if ( $loglevel eq 'all' ); + $facility = $facmap{$facility} if ( $facmap{$facility} ); + $loglevel = '*' if ( $loglevel eq 'all' ); add_entry( $facility . '.' . $loglevel, $target ); } @@ -90,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 |