mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-09 06:20:05 +01:00
Another tweak to LOG_BACKEND
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
540eff24aa
commit
520d21c056
@ -352,13 +352,12 @@ sub setup_interface_proc( $ ) {
|
|||||||
sub setup_log_backend($) {
|
sub setup_log_backend($) {
|
||||||
if ( my $setting = $config{LOG_BACKEND} ) {
|
if ( my $setting = $config{LOG_BACKEND} ) {
|
||||||
my $family = shift;
|
my $family = shift;
|
||||||
my $file = '/proc/net/netfilter/nf_log';
|
my $file = '/proc/sys/net/netfilter/nf_log/' . ( $family == F_IPV4 ? '2' : '10' );
|
||||||
my $ctl = 'net.netfilter.nf_log.' . ( $family == F_IPV4 ? '2' : '10' );
|
|
||||||
|
|
||||||
emit( 'progress_message2 "Setting up log backend"',
|
emit( 'progress_message2 "Setting up log backend"',
|
||||||
'',
|
'',
|
||||||
"if [ -f $file ]; then",
|
"if [ -f $file ]; then",
|
||||||
" if sysctl $ctl=$setting; then",
|
" if echo $setting > $file; then",
|
||||||
" progress_message 'Log Backend set to $setting'",
|
" progress_message 'Log Backend set to $setting'",
|
||||||
' else',
|
' else',
|
||||||
" error_message 'WARNING: Unable to set log backend to $setting'",
|
" error_message 'WARNING: Unable to set log backend to $setting'",
|
||||||
|
Loading…
Reference in New Issue
Block a user