summaryrefslogtreecommitdiffstats
path: root/etc/inc/interfaces.inc
diff options
context:
space:
mode:
authorgnhb <gnoahb@gmail.com>2010-04-10 22:07:48 +0700
committergnhb <gnoahb@gmail.com>2010-04-10 22:07:48 +0700
commit632921995c58c6dadced140ca4f2aed2932e3b74 (patch)
tree5636313589460fcc625b7fa9ecb86ab51737fb0b /etc/inc/interfaces.inc
parent73ee49f20460fe724258153aabcd61be8bc4f52f (diff)
downloadpfsense-632921995c58c6dadced140ca4f2aed2932e3b74.zip
pfsense-632921995c58c6dadced140ca4f2aed2932e3b74.tar.gz
Implement reporting and logging of historical PPP uptime with data persistent through reboot.
Also, change the way uptime is captured. The mpd console is no longer used to get PPP uptime data, which will prevent spamming of PPP logs with console access messages. This means we no longer have to write out mpd_<interface>.query files to /var/etc. Now, a simple calculation of the age of the /tmp/<interface>up file is used. This gives the same data within the second as the console data so it seems acceptable. I removed some "rm -f" calls from ppp-linkdown as there was already code in interfaces.inc interface_bring_down function that unlinks the <interface>up and <interface>_router files. There is still the rm -r nameserver_<interface> call in the linkdown script. Maybe this should be moved to the interfac_bring_down function for consistency? Also, I commented out the ngctl shutdown <interface>: call. I think it's probably not necessary any more.
Diffstat (limited to 'etc/inc/interfaces.inc')
-rw-r--r--etc/inc/interfaces.inc19
1 files changed, 0 insertions, 19 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 9dc9f9b..8bf674f 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -1033,25 +1033,6 @@ EOD;
fwrite($fd, $mpdconf);
fclose($fd);
- $fdlnkq = fopen("{$g['varetc_path']}/mpd_{$interface}.query", "w");
- if (!$fdlnkq) {
- /* NOTE: It is not fatal if we cannot write the query.") */
- log_error("Error: cannot open mpd_{$interface}.query in interface_ppp_configure().\n");
- } else {
- $linkquery = <<<EOD
-admin
-pfsense
-link lnk{$interface}
-show iface
-exit
-
-EOD;
-
- // Write out linkquery file for each configured PPP interface.
- fwrite($fdlnkq, $linkquery);
- fclose($fdlnkq);
- }
-
// Launch specified ppp instance
if (file_exists("{$ppp['port']}")) {
/* fire up mpd */
OpenPOWER on IntegriCloud