summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-04-12 10:04:54 -0400
committerjim-p <jimp@pfsense.org>2011-04-12 10:04:54 -0400
commitd67b6b175cc593c20fe2e151b2ca88fd32eee478 (patch)
treedbc206b4c27fb44e613c4a8d7483223b454d10bf
parent127eb8e0238061ca8a66e25c2089dddc1826ec4d (diff)
downloadpfsense-d67b6b175cc593c20fe2e151b2ca88fd32eee478.zip
pfsense-d67b6b175cc593c20fe2e151b2ca88fd32eee478.tar.gz
Also exclude grep from running processes when grepping for a running packet capture. Also, fix other test to match the recent changes made.
-rw-r--r--usr/local/www/diag_packet_capture.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/www/diag_packet_capture.php b/usr/local/www/diag_packet_capture.php
index b35cc1b..684011c 100644
--- a/usr/local/www/diag_packet_capture.php
+++ b/usr/local/www/diag_packet_capture.php
@@ -72,7 +72,7 @@ if ($_POST) {
} elseif ($_POST['stopbtn']!= "") {
$action = gettext("Stop");
- $processes_running = trim(shell_exec('/bin/ps axw -O pid= | /usr/bin/grep tcpdump | /usr/bin/grep '.$fn.' | /usr/bin/grep -v pflog'));
+ $processes_running = trim(shell_exec("/bin/ps axw -O pid= | /usr/bin/grep tcpdump | /usr/bin/grep {$fn} | /usr/bin/egrep -v '(pflog|grep)'"));
//explode processes into an array, (delimiter is new line)
$processes_running_array = explode("\n", $processes_running);
@@ -194,7 +194,7 @@ include("fbegin.inc");
<?php
/* check to see if packet capture tcpdump is already running */
- $processcheck = (trim(shell_exec("/bin/ps axw -O pid= | /usr/bin/grep tcpdump | /usr/bin/grep {$fn} | /usr/bin/grep -v pflog")));
+ $processcheck = (trim(shell_exec("/bin/ps axw -O pid= | /usr/bin/grep tcpdump | /usr/bin/grep {$fn} | /usr/bin/egrep -v '(pflog|grep)'")));
if ($processcheck != "")
$processisrunning = true;
OpenPOWER on IntegriCloud