summaryrefslogtreecommitdiffstats
path: root/etc/inc/config.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-11-17 23:21:42 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-11-17 23:21:42 +0000
commite9208daf22b9d4770e4e98621e237d77f975217d (patch)
tree6a9c9d924f153074409d1e0e15d93f6a5a13a26a /etc/inc/config.inc
parent4f96228201ba5406b69c0bd7bf67781017866d6e (diff)
downloadpfsense-e9208daf22b9d4770e4e98621e237d77f975217d.zip
pfsense-e9208daf22b9d4770e4e98621e237d77f975217d.tar.gz
Before reading in config.xml and parsing it, ensure that user has not "upgraded" from m0n0wall
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r--etc/inc/config.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc
index 22977de..6734c09 100644
--- a/etc/inc/config.inc
+++ b/etc/inc/config.inc
@@ -62,6 +62,14 @@ if (file_exists("{$g['etc_path']}/platform")) {
if(file_exists("/debugging"))
$debugging = true;
+$config_contents = file_get_contents("/cf/conf/config.xml");
+if(stristr($config_contents, "m0n0wall") == true) {
+ /* user has just upgraded to m0n0wall, replace root xml tags */
+ $config_contents = str_replace("m0n0wall","pfsense");
+ $fd = fopen("/cf/conf/config.xml", "w");
+ fwrite($fd, $config_contents);
+ fclose($fd);
+}
/* if our config file exists bail out, we're already set. */
if ($g['booting'] and !file_exists($g['cf_conf_path'] . "/config.xml") ) {
OpenPOWER on IntegriCloud