diff options
author | Bill Marquette <billm@pfsense.org> | 2005-04-04 00:33:49 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-04-04 00:33:49 +0000 |
commit | 963d5343ba78c339d8e3a64209255d39880b7725 (patch) | |
tree | 82839fdf30da9dcba55715dd9256d68cd578a6a5 /usr/local/www/diag_logs.php | |
parent | 5d255aecf9244d5c4b2090a2d943e35276ab7e84 (diff) | |
download | pfsense-963d5343ba78c339d8e3a64209255d39880b7725.zip pfsense-963d5343ba78c339d8e3a64209255d39880b7725.tar.gz |
Cleanup paths
Standardize settings (262144 file lengths)
Move IPSEC VPN next to PPTP VPN
style cleanup
various other minor cleanups
Diffstat (limited to 'usr/local/www/diag_logs.php')
-rwxr-xr-x | usr/local/www/diag_logs.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/usr/local/www/diag_logs.php b/usr/local/www/diag_logs.php index 14fc6c1..f2fbfa4 100755 --- a/usr/local/www/diag_logs.php +++ b/usr/local/www/diag_logs.php @@ -34,12 +34,14 @@ require("guiconfig.inc"); +$system_logfile = "{$g['varlog_path']}/system.log"; + $nentries = $config['syslog']['nentries']; if (!$nentries) $nentries = 50; if ($_POST['clear']) { - exec("/usr/sbin/clog -i -s 262144 {$g['varlog_path']}/system.log"); + exec("/usr/sbin/clog -i -s 262144 {$system_logfile}"); } function dump_clog($logfile, $tail, $withorig = true) { @@ -47,7 +49,7 @@ function dump_clog($logfile, $tail, $withorig = true) { $sor = isset($config['syslog']['reverse']) ? "-r" : ""; - exec("/usr/sbin/clog " . $logfile . " | grep -v racoon | /usr/bin/tail {$sor} -n " . $tail, $logarr); + exec("/usr/sbin/clog {$logfile} | /usr/bin/grep -v racoon | /usr/bin/tail {$sor} -n {$tail}", $logarr); foreach ($logarr as $logent) { $logent = preg_split("/\s+/", $logent, 6); @@ -67,22 +69,22 @@ function dump_clog($logfile, $tail, $withorig = true) { <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> -<title><?=gentitle("Diagnostics: System logs");?></title> +<title><?=gentitle("Diagnostics: System logs: System");?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="gui.css" rel="stylesheet" type="text/css"> </head> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include("fbegin.inc"); ?> -<p class="pgtitle">Diagnostics: System logs</p> +<p class="pgtitle">Diagnostics: System logs: System</p> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td> <ul id="tabnav"> <li class="tabact">System</li> - <li class="tabinact"><a href="diag_logs_ipsec.php">IPSEC Vpn</a></li> <li class="tabinact"><a href="diag_logs_filter.php">Firewall</a></li> <li class="tabinact"><a href="diag_logs_dhcp.php">DHCP</a></li> <li class="tabinact"><a href="diag_logs_auth.php">Portal Auth</a></li> + <li class="tabinact"><a href="diag_logs_ipsec.php">IPSEC VPN</a></li> <li class="tabinact"><a href="diag_logs_vpn.php">PPTP VPN</a></li> <li class="tabinact"><a href="diag_logs_settings.php">Settings</a></li> </ul> @@ -94,7 +96,7 @@ function dump_clog($logfile, $tail, $withorig = true) { <td colspan="2" class="listtopic"> Last <?=$nentries;?> system log entries</td> </tr> - <?php dump_clog("{$g['varlog_path']}/system.log", $nentries); ?> + <?php dump_clog($system_logfile, $nentries); ?> </table> <br><form action="diag_logs.php" method="post"> <input name="clear" type="submit" class="formbtn" value="Clear log"> |