Commit 5b9d5d45 authored by Ad Schellevis's avatar Ad Schellevis

fix merge

parent 9921aeaf
...@@ -1217,7 +1217,6 @@ ...@@ -1217,7 +1217,6 @@
if($successful_update == true) { if($successful_update == true) {
/* Write WAN IP to cache file */ /* Write WAN IP to cache file */
$wan_ip = $this->_checkIP(); $wan_ip = $this->_checkIP();
conf_mount_rw();
if ($this->_useIPv6 == false && $wan_ip > 0) { if ($this->_useIPv6 == false && $wan_ip > 0) {
$currentTime = time(); $currentTime = time();
notify_all_remote(sprintf(gettext("DynDNS updated IP Address on %s (%s) to %s"), convert_real_interface_to_friendly_descr($this->_if), $this->_if, $wan_ip)); notify_all_remote(sprintf(gettext("DynDNS updated IP Address on %s (%s) to %s"), convert_real_interface_to_friendly_descr($this->_if), $this->_if, $wan_ip));
...@@ -1232,7 +1231,6 @@ ...@@ -1232,7 +1231,6 @@
@file_put_contents($this->_cacheFile_v6, "{$wan_ip}|{$currentTime}"); @file_put_contents($this->_cacheFile_v6, "{$wan_ip}|{$currentTime}");
} else } else
@unlink($this->_cacheFile_v6); @unlink($this->_cacheFile_v6);
conf_mount_ro();
} }
$this->status = $status; $this->status = $status;
log_error($status); log_error($status);
...@@ -1307,10 +1305,8 @@ ...@@ -1307,10 +1305,8 @@
$initial = false; $initial = false;
$log_error .= "Cached IPv6: {$cacheIP} "; $log_error .= "Cached IPv6: {$cacheIP} ";
} else { } else {
conf_mount_rw();
$cacheIP = '::'; $cacheIP = '::';
@file_put_contents($this->_cacheFile, "::|{$currentTime}"); @file_put_contents($this->_cacheFile, "::|{$currentTime}");
conf_mount_ro();
$cacheTime = $currentTime; $cacheTime = $currentTime;
$initial = true; $initial = true;
$log_error .= "No Cached IPv6 found."; $log_error .= "No Cached IPv6 found.";
...@@ -1323,10 +1319,8 @@ ...@@ -1323,10 +1319,8 @@
$initial = false; $initial = false;
$log_error .= "Cached IP: {$cacheIP} "; $log_error .= "Cached IP: {$cacheIP} ";
} else { } else {
conf_mount_rw();
$cacheIP = '0.0.0.0'; $cacheIP = '0.0.0.0';
@file_put_contents($this->_cacheFile, "0.0.0.0:{$currentTime}"); @file_put_contents($this->_cacheFile, "0.0.0.0:{$currentTime}");
conf_mount_ro();
$cacheTime = $currentTime; $cacheTime = $currentTime;
$initial = true; $initial = true;
$log_error .= "No Cached IP found."; $log_error .= "No Cached IP found.";
...@@ -1376,11 +1370,9 @@ ...@@ -1376,11 +1370,9 @@
*/ */
function _debug($data) { function _debug($data) {
$string = date('m-d-y h:i:s').' - ('.$this->_debugID.') - ['.$this->_dnsService.'] - '.$data."\n"; $string = date('m-d-y h:i:s').' - ('.$this->_debugID.') - ['.$this->_dnsService.'] - '.$data."\n";
conf_mount_rw();
$file = fopen($this->_debugFile, 'a'); $file = fopen($this->_debugFile, 'a');
fwrite($file, $string); fwrite($file, $string);
fclose($file); fclose($file);
conf_mount_ro();
} }
function _checkIP() { function _checkIP() {
if ($this->_useIPv6 == true) { if ($this->_useIPv6 == true) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment