diff options
author | Deepti Kulkarni <deepti@vyatta.com> | 2011-12-16 04:19:02 -0800 |
---|---|---|
committer | Deepti Kulkarni <deepti@vyatta.com> | 2011-12-16 04:19:02 -0800 |
commit | bad26964038fbe9d8b904e500c9fc3f90a70a005 (patch) | |
tree | a0ca4f3c4a1b26789b4752228dbb9d97c2949ff7 /scripts | |
parent | f0f5874e15f2095bb2935d1b3bf92d321dc7c33f (diff) | |
download | vyatta-conntrack-bad26964038fbe9d8b904e500c9fc3f90a70a005.tar.gz vyatta-conntrack-bad26964038fbe9d8b904e500c9fc3f90a70a005.zip |
Resolved merge errors from Makefile.
Moved ConntrackUtil.pm to Conntrack dir.
Bug fix for 7676 for conntrack logging.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/vyatta-update-conntrack-log.pl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/vyatta-update-conntrack-log.pl b/scripts/vyatta-update-conntrack-log.pl index 09ee0a5..8d0ec88 100644 --- a/scripts/vyatta-update-conntrack-log.pl +++ b/scripts/vyatta-update-conntrack-log.pl @@ -3,15 +3,20 @@ use strict; use lib "/opt/vyatta/share/perl5"; use Vyatta::Conntrack::Config; +use Vyatta::Conntrack::ConntrackUtil; my $pfile = '/var/run/vyatta/connlogd.lock'; -my $lfile = '/var/run/vyatta/connlogd.log'; my $config = new Vyatta::Conntrack::Config; my $oconfig = new Vyatta::Conntrack::Config; + $config->setup(); $oconfig->setupOrig(); +if (!(Vyatta::Conntrack::ConntrackUtil::check_for_conntrack_hooks())) { + print "Warning: Connection tracking is not enabled\n"; +} + if (!($config->isDifferentFrom($oconfig))) { if ($config->isEmpty()) { print STDERR "Empty Configuration\n"; @@ -26,7 +31,6 @@ if ($config->isEmpty()) { Vyatta::Conntrack::Config::kill_daemon(); # delete the .lock and .log file getting generated `rm -f $pfile`; - `rm -f $lfile`; exit 0; } @@ -35,7 +39,6 @@ if ($cmd) { # First stop the daemon and restart with config Vyatta::Conntrack::Config::kill_daemon(); `rm -f $pfile`; - `rm -f $lfile`; system("$cmd"); if ($? >> 8) { print STDERR "Failed to start conntrack logging daemon"; |