summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2016-01-17 00:33:14 -0800
committerNOYB <Al_Stu@Frontier.com>2016-01-17 00:33:14 -0800
commitd3d05c1528ef91ed1a76f461c07e746e3931e874 (patch)
treebf7cb513559fc027085877d071b2f3a81cb1c80a /src
parente163952f29d1b9bc68731985c14caa3129ce49ce (diff)
downloadpfsense-d3d05c1528ef91ed1a76f461c07e746e3931e874.zip
pfsense-d3d05c1528ef91ed1a76f461c07e746e3931e874.tar.gz
Status / System Logs - Raw Mode Search Inversion
Add search inversion to dump_clog and dump_clog_no_table functions for raw mode logs filter.
Diffstat (limited to 'src')
-rw-r--r--src/usr/local/www/guiconfig.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc
index 170215a..d09213b 100644
--- a/src/usr/local/www/guiconfig.inc
+++ b/src/usr/local/www/guiconfig.inc
@@ -563,7 +563,11 @@ function dump_clog_no_table($logfile, $tail, $withorig = true, $grepfor = "", $g
$logarr = "";
$grepline = " ";
if (is_array($grepfor)) {
- $grepline .= " | /usr/bin/egrep " . escapeshellarg(implode("|", $grepfor));
+ if ((strpos($grepfor[0], '!') === 0)) {
+ $grepfor[0] = substr($grepfor[0], 1);
+ $invert = '-v';
+ }
+ $grepline .= " | /usr/bin/egrep $invert " . escapeshellarg(implode("|", $grepfor));
}
if (is_array($grepinvert)) {
$grepline .= " | /usr/bin/egrep -v " . escapeshellarg(implode("|", $grepinvert));
@@ -609,7 +613,11 @@ function dump_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinvert
$logarr = "";
$grepline = " ";
if (is_array($grepfor)) {
- $grepline .= " | /usr/bin/egrep " . escapeshellarg(implode("|", $grepfor));
+ if ((strpos($grepfor[0], '!') === 0)) {
+ $grepfor[0] = substr($grepfor[0], 1);
+ $invert = '-v';
+ }
+ $grepline .= " | /usr/bin/egrep $invert " . escapeshellarg(implode("|", $grepfor));
}
if (is_array($grepinvert)) {
$grepline .= " | /usr/bin/egrep -v " . escapeshellarg(implode("|", $grepinvert));
OpenPOWER on IntegriCloud