summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-02-01 18:23:54 +0000
committerErmal Luçi <eri@pfsense.org>2010-02-01 18:23:54 +0000
commitab94ba001994625d6fe0a249361f5feeca5523c2 (patch)
treeb3c583a1787eebff061c71327159139e96dab4d1
parented6b04d865c2a53ec04b70769c10b90ff0326c26 (diff)
downloadpfsense-ab94ba001994625d6fe0a249361f5feeca5523c2.zip
pfsense-ab94ba001994625d6fe0a249361f5feeca5523c2.tar.gz
Ticket #309. Correctly fix the problems of intermediate config lost because of inclusion of config.inc. This might have speed impacts to be measured.
-rw-r--r--etc/inc/config.inc6
-rw-r--r--etc/inc/pkg-utils.inc2
-rw-r--r--etc/inc/util.inc8
3 files changed, 10 insertions, 6 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index ace1cc7..847d7f3 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -49,10 +49,8 @@
if($g['booting']) echo ".";
/* do not load this file twice. */
-if($config_inc_loaded == true)
+if (is_file_included("/etc/inc/config.inc"))
return;
-else
- $config_inc_loaded = true;
// Set the memory limit to 128M. When someone has something like 500+ tunnels
// the parser needs quite a bit of ram. Do not remove this line unless you
@@ -213,4 +211,4 @@ if($config_parsed == true) {
}
}
-?> \ No newline at end of file
+?>
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index b1a53b6..5d48ffc 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -458,8 +458,6 @@ function install_package($package, $pkg_info = "") {
$changedesc = "Overwrote previous installation of {$pkg_info['name']}.";
$to_output = "overwrite!\n";
}
- /* XXX: This is a workaround for Ticket #309. */
- write_config($changedesc);
$static_output .= $to_output;
update_output_window($static_output);
/* install other package components */
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 10b9366..559a3bc 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -1138,4 +1138,12 @@ function is_URL($url) {
return false;
}
+function is_file_included($file = "") {
+ $files = get_included_files();
+ if (in_array($file, $files))
+ return true;
+
+ return false;
+}
+
?>
OpenPOWER on IntegriCloud