summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-11-04 00:47:55 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-11-04 00:47:55 +0000
commit53d366fd6512a4f784bbf74f6c829b1f0e3819fa (patch)
tree59f7137b17dd2ac089372d32ad1a378cdb1c5c6a /etc/inc
parent39363e03a69a0fef5e663fc986edd19956a295d1 (diff)
downloadpfsense-53d366fd6512a4f784bbf74f6c829b1f0e3819fa.zip
pfsense-53d366fd6512a4f784bbf74f6c829b1f0e3819fa.tar.gz
Change cache file location to /cf/conf
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/dyndns.class10
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class
index 21ffcf2..78ad013 100644
--- a/etc/inc/dyndns.class
+++ b/etc/inc/dyndns.class
@@ -46,7 +46,7 @@
*/
class updatedns {
- var $_cacheFile = '/var/etc/dyndns.cache';
+ var $_cacheFile = '/cf/conf/dyndns.cache';
var $_debugFile = '/var/etc/dyndns.debug';
var $_UserAgent = 'User-Agent: phpDynDNS/0.7';
var $_errorVerbosity = 0;
@@ -477,9 +477,11 @@
$initial = false;
log_error("DynDns: Cached IP: {cacheIP}");
} else {
+ conf_mount_rw();
$file = fopen($this->_cacheFile, 'w');
fwrite($file, '0.0.0.0:'.$currentTime);
fclose($file);
+ conf_mount_ro();
$cacheIP = '0.0.0.0';
$cacheTime = $currentTime;
$initial = true;
@@ -513,9 +515,11 @@
*/
if($needs_updating == TRUE) {
/* Write WAN IP to cache file */
+ conf_mount_rw();
$file = fopen($this->_cacheFile, 'w');
fwrite($file, $wan_ip.':'.$currentTime);
- fclose($file);
+ fclose($file);
+ conf_mount_ro();
return TRUE;
} else {
return FALSE;
@@ -533,9 +537,11 @@
*/
function _debug ($data) {
$string = date('m-d-y h:i:s').' - ('.$this->_debugID.') - ['.$this->_dnsService.'] - '.$data;
+ conf_mount_rw();
$file = fopen($this->_debugFile, 'a');
fwrite($file, $string);
fclose($file);
+ conf_mount_ro();
}
}
OpenPOWER on IntegriCloud