summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.inc
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2009-08-13 13:26:34 +0000
committerErmal Luçi <eri@pfsense.org>2009-08-13 13:49:22 +0000
commit4619735332e65bd3dd4fa1d0a72ed4dd71c76a9e (patch)
tree9a5614ab3d52c495d3ef978b4b274e374a919c92 /etc/inc/config.inc
parentdee5d2fbfc3ed6bf8f497d127670a40c555d6180 (diff)
downloadpfsense-4619735332e65bd3dd4fa1d0a72ed4dd71c76a9e.zip
pfsense-4619735332e65bd3dd4fa1d0a72ed4dd71c76a9e.tar.gz
Check even if the file exists or not. Only checking filesize its not enough for all cases.
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r--etc/inc/config.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index cd1f0bb..96b592b 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -243,7 +243,7 @@ function parse_config($parse = false) {
global $g;
$lockkey = lock('config');
- if (filesize("{$g['conf_path']}/config.xml") == 0) {
+ if (!file_exists("{$g['conf_path']}/config.xml") || filesize("{$g['conf_path']}/config.xml") == 0) {
$last_backup = discover_last_backup();
if($last_backup) {
log_error("No config.xml found, attempting last known config restore.");
@@ -1314,4 +1314,4 @@ function set_device_perms() {
if($g['booting']) echo ".";
$config = parse_config();
-?> \ No newline at end of file
+?>
OpenPOWER on IntegriCloud