diff options
author | jim-p <jimp@pfsense.org> | 2011-04-12 10:04:54 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-04-12 10:04:54 -0400 |
commit | d67b6b175cc593c20fe2e151b2ca88fd32eee478 (patch) | |
tree | dbc206b4c27fb44e613c4a8d7483223b454d10bf | |
parent | 127eb8e0238061ca8a66e25c2089dddc1826ec4d (diff) | |
download | pfsense-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.php | 4 |
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; |