diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2016-01-17 08:11:16 -0500 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2016-01-17 08:11:16 -0500 |
commit | daf566f10c75cb50458de9c50a50da69e346459f (patch) | |
tree | 3d18857a37e1b4085eff19a56da186699407c6a2 /src | |
parent | ff7f70b407fceaf7e05b062f784acfce68c8ffd2 (diff) | |
parent | d3d05c1528ef91ed1a76f461c07e746e3931e874 (diff) | |
download | pfsense-daf566f10c75cb50458de9c50a50da69e346459f.zip pfsense-daf566f10c75cb50458de9c50a50da69e346459f.tar.gz |
Merge pull request #2451 from NOYB/Status_/_System_Logs_-_Raw_Mode_Search_Inversion
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/local/www/guiconfig.inc | 12 |
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)); |