summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-06-11 22:31:15 +0000
committerColin Smith <colin@pfsense.org>2005-06-11 22:31:15 +0000
commitecc9977a85f6c8a8843e3754291bed2bc725c285 (patch)
tree18252141c52fe760b732da73e492afd981adf434 /usr/local
parent3f01fe47376ec40c2a7226e5801d3d2b52acf5d7 (diff)
downloadpfsense-ecc9977a85f6c8a8843e3754291bed2bc725c285.zip
pfsense-ecc9977a85f6c8a8843e3754291bed2bc725c285.tar.gz
Remove package handling from dump_clog.
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/guiconfig.inc27
1 files changed, 1 insertions, 26 deletions
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index 27417d5..80ae2bb 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -458,35 +458,10 @@ function update_changedesc($update) {
$changecount++;
}
-function dump_clog($logfile, $tail, $grepfor = "", $grepinvert = false, $withorig = true, $ignorepkgs = true) {
- require_once("pkg-utils.inc");
+function dump_clog($logfile, $tail, $withorig = true) {
global $g, $config;
$sor = isset($config['syslog']['reverse']) ? "-r" : "";
exec("/usr/sbin/clog {$logfile} | /usr/bin/tail {$sor} -n {$tail}", $logarr);
- if(!is_array($grepfor)) $grepfor = array($grepfor);
- if(!is_array($grepinvert)) $grepinvert = array($grepinvert);
- if($ignorepkgs == true and $config['installedpackages']['package'] != "") {
- foreach($config['installedpackages']['package'] as $pkg) {
- $pkg_config = parse_xml_config("/usr/local/pkg/" . $pkg['configurationfile'], "packagegui");
- if($pkg_config['logging'] != "" and $pkg_config['logging']['grepfor'] != "") {
- $grepfor[] = $pkg_config['logging']['grepfor'];
- $grepinvert[] = true;
- }
- }
- }
- if($grepfor <> "") {
- $i = 0;
- foreach($grepfor as $agrep) {
- $regexp = "/" . $agrep . "/i";
- if($grepinvert[$i] == true) {
- $logarr = preg_grep($regexp, $logarr, PREG_GREP_INVERT);
- } else {
- $logarr = preg_grep($regexp, $logarr);
- }
- $i++;
- }
- }
-
foreach ($logarr as $logent) {
$logent = preg_split("/\s+/", $logent, 6);
echo "<tr valign=\"top\">\n";
OpenPOWER on IntegriCloud