From 9921aeaf7b17758328ee5ea37e177cc90cbdfb64 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Mon, 23 Mar 2015 13:36:59 +0000 Subject: [PATCH] fix merge issues --- src/etc/inc/config.lib.inc | 8 -------- src/etc/inc/dyndns.class | 8 ++++++++ src/www/interfaces.php | 2 -- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc index bcc80c239..7bb6bfc60 100644 --- a/src/etc/inc/config.lib.inc +++ b/src/etc/inc/config.lib.inc @@ -101,14 +101,6 @@ function parse_config_bootup() log_error("Last known config found and restored. Please double check your configuration file for accuracy."); file_notice("config.xml", gettext("Last known config found and restored. Please double check your configuration file for accuracy."), "pfSenseConfigurator", ""); } - if (!file_exists($config_xml)) { - echo sprintf(gettext("XML configuration file not found. %s cannot continue booting."), $g['product_name']) . "\n"; - unlock($lockkey); - mwexec("/sbin/halt"); - exit; - } - log_error("Last known config found and restored. Please double check your configuration file for accuracy."); - file_notice("config.xml", gettext("Last known config found and restored. Please double check your configuration file for accuracy."), "pfSenseConfigurator", ""); } else { log_error(gettext("Could not find a usable configuration file! Exiting....")); exit(0); diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class index d276093b2..d18d9d911 100644 --- a/src/etc/inc/dyndns.class +++ b/src/etc/inc/dyndns.class @@ -1217,6 +1217,7 @@ if($successful_update == true) { /* Write WAN IP to cache file */ $wan_ip = $this->_checkIP(); + conf_mount_rw(); if ($this->_useIPv6 == false && $wan_ip > 0) { $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)); @@ -1231,6 +1232,7 @@ @file_put_contents($this->_cacheFile_v6, "{$wan_ip}|{$currentTime}"); } else @unlink($this->_cacheFile_v6); + conf_mount_ro(); } $this->status = $status; log_error($status); @@ -1305,8 +1307,10 @@ $initial = false; $log_error .= "Cached IPv6: {$cacheIP} "; } else { + conf_mount_rw(); $cacheIP = '::'; @file_put_contents($this->_cacheFile, "::|{$currentTime}"); + conf_mount_ro(); $cacheTime = $currentTime; $initial = true; $log_error .= "No Cached IPv6 found."; @@ -1319,8 +1323,10 @@ $initial = false; $log_error .= "Cached IP: {$cacheIP} "; } else { + conf_mount_rw(); $cacheIP = '0.0.0.0'; @file_put_contents($this->_cacheFile, "0.0.0.0:{$currentTime}"); + conf_mount_ro(); $cacheTime = $currentTime; $initial = true; $log_error .= "No Cached IP found."; @@ -1370,9 +1376,11 @@ */ function _debug($data) { $string = date('m-d-y h:i:s').' - ('.$this->_debugID.') - ['.$this->_dnsService.'] - '.$data."\n"; + conf_mount_rw(); $file = fopen($this->_debugFile, 'a'); fwrite($file, $string); fclose($file); + conf_mount_ro(); } function _checkIP() { if ($this->_useIPv6 == true) { diff --git a/src/www/interfaces.php b/src/www/interfaces.php index ae3f37331..bae1876ec 100644 --- a/src/www/interfaces.php +++ b/src/www/interfaces.php @@ -400,8 +400,6 @@ if ($_POST['apply']) { if (!is_subsystem_dirty('interfaces')) { $intput_errors[] = gettext("You have already applied your settings!"); } else { - unlink_if_exists('/tmp/config.cache'); - clear_subsystem_dirty('interfaces'); if (file_exists('/tmp/.interfaces.apply')) {