aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2014-01-30 16:11:33 -0500
committerjim-p <jimp@pfsense.org>2014-01-30 16:11:33 -0500
commit2c6efc978d2fc988ff8fafbf59bcdc6050a3695d (patch)
tree70425ad169d43b61fbe2fb10effa34e550868e36
parentf2a90c5c758afc8f8306beff5b45b150838a34ef (diff)
downloadpfsense-packages-2c6efc978d2fc988ff8fafbf59bcdc6050a3695d.tar.gz
pfsense-packages-2c6efc978d2fc988ff8fafbf59bcdc6050a3695d.tar.bz2
pfsense-packages-2c6efc978d2fc988ff8fafbf59bcdc6050a3695d.zip
Allow for multiple filter terms in mailreport
-rw-r--r--config/mailreport/mail_reports.inc3
-rw-r--r--config/mailreport/mailreport.xml2
-rw-r--r--pkg_config.10.xml2
-rw-r--r--pkg_config.8.xml2
-rw-r--r--pkg_config.8.xml.amd642
5 files changed, 5 insertions, 6 deletions
diff --git a/config/mailreport/mail_reports.inc b/config/mailreport/mail_reports.inc
index cf8c837c..94c7500c 100644
--- a/config/mailreport/mail_reports.inc
+++ b/config/mailreport/mail_reports.inc
@@ -1232,8 +1232,7 @@ function mail_report_get_log($logfile, $tail, $grepfor) {
$logarr = "";
$grepline = " ";
if(is_array($grepfor))
- foreach($grepfor as $agrep)
- $grepline .= " | grep \"$agrep\"";
+ $grepline = " | /usr/bin/egrep " . escapeshellarg(implode("|", $grepfor));
if($config['system']['disablesyslogclog']) {
exec("cat {$logfile}{$grepline} | /usr/bin/tail -n {$tail}", $logarr);
} else {
diff --git a/config/mailreport/mailreport.xml b/config/mailreport/mailreport.xml
index 3b926753..4d392fd9 100644
--- a/config/mailreport/mailreport.xml
+++ b/config/mailreport/mailreport.xml
@@ -37,7 +37,7 @@
]]>
</copyright>
<name>mailreport</name>
- <version>2.0.7</version>
+ <version>2.0.8</version>
<title>Status: Mail Reports</title>
<additional_files_needed>
<prefix>/usr/local/bin/</prefix>
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index 75bcedde..8578b22b 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -1385,7 +1385,7 @@
<name>mailreport</name>
<descr>Allows you to setup periodic e-mail reports containing command output, log file contents, and RRD graphs.</descr>
<category>Network Management</category>
- <version>2.0.7</version>
+ <version>2.0.8</version>
<status>Stable</status>
<required_version>2.2</required_version>
<config_file>http://www.pfsense.com/packages/config/mailreport/mailreport.xml</config_file>
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index b5505b8e..47da7aa8 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -1717,7 +1717,7 @@
<name>mailreport</name>
<descr>Allows you to setup periodic e-mail reports containing command output, log file contents, and RRD graphs.</descr>
<category>Network Management</category>
- <version>2.0.7</version>
+ <version>2.0.8</version>
<status>Stable</status>
<required_version>2.0</required_version>
<config_file>http://www.pfsense.com/packages/config/mailreport/mailreport.xml</config_file>
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index 9ab48dcb..22f93083 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -1704,7 +1704,7 @@
<name>mailreport</name>
<descr>Allows you to setup periodic e-mail reports containing command output, log file contents, and RRD graphs.</descr>
<category>Network Management</category>
- <version>2.0.7</version>
+ <version>2.0.8</version>
<status>Stable</status>
<required_version>2.0</required_version>
<config_file>http://www.pfsense.com/packages/config/mailreport/mailreport.xml</config_file>