diff options
author | Ermal <eri@pfsense.org> | 2011-05-25 17:08:22 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2011-05-25 17:08:22 +0000 |
commit | dceff62e8144b56cb292e1a3fd69abe307072625 (patch) | |
tree | 918401ea410cb8aeb8fc00962c63f35c8f583fd7 /etc | |
parent | 193ee786a468c7fdcc3fc9086d1747b3d879c4a5 (diff) | |
download | pfsense-dceff62e8144b56cb292e1a3fd69abe307072625.zip pfsense-dceff62e8144b56cb292e1a3fd69abe307072625.tar.gz |
Put some debug info during dyndns update under debug conditionals.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/dyndns.class | 17 | ||||
-rw-r--r-- | etc/inc/services.inc | 2 |
2 files changed, 11 insertions, 8 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class index d8a350b..01209b9 100644 --- a/etc/inc/dyndns.class +++ b/etc/inc/dyndns.class @@ -854,8 +854,10 @@ * | work with other systems. pfSense base is FreeBSD. */ function _detectChange() { - - log_error("DynDns: _detectChange() starting."); + global $debug; + + if ($debug) + log_error("DynDns: _detectChange() starting."); $currentTime = time(); @@ -865,14 +867,14 @@ return false; } $this->_dnsIP = $wan_ip; - log_error("DynDns: Current WAN IP: {$wan_ip}"); + $log_error = "DynDns: Current WAN IP: {$wan_ip} "; if (file_exists($this->_cacheFile)) { $contents = file_get_contents($this->_cacheFile); list($cacheIP,$cacheTime) = split(':', $contents); $this->_debug($cacheIP.'/'.$cacheTime); $initial = false; - log_error("DynDns: Cached IP: {$cacheIP}"); + $log_error .= "Cached IP: {$cacheIP} "; } else { conf_mount_rw(); $cacheIP = '0.0.0.0'; @@ -880,8 +882,9 @@ conf_mount_ro(); $cacheTime = $currentTime; $initial = true; - log_error("DynDns: No Cached IP found."); + $log_error .= "No Cached IP found."; } + log_error($log_error); /* use 2419200 for dyndns, dhs, easydns, noip, hn * zoneedit, dyns, ods @@ -931,8 +934,10 @@ conf_mount_ro(); } function _checkIP() { + global $debug; - log_error("DynDns: _checkIP() starting."); + if ($debug) + log_error("DynDns: _checkIP() starting."); $ip_address = find_interface_ip($this->_if); if (!is_ipaddr($ip_address)) diff --git a/etc/inc/services.inc b/etc/inc/services.inc index e7028c6..d5c9ada 100644 --- a/etc/inc/services.inc +++ b/etc/inc/services.inc @@ -606,8 +606,6 @@ function services_dyndns_configure_client($conf) { /* load up the dyndns.class */ require_once("dyndns.class"); - log_error("DynDns: Running updatedns()"); - $dns = new updatedns($dnsService = $conf['type'], $dnsHost = $conf['host'], $dnsUser = $conf['username'], |