diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-11-17 23:21:42 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-11-17 23:21:42 +0000 |
commit | e9208daf22b9d4770e4e98621e237d77f975217d (patch) | |
tree | 6a9c9d924f153074409d1e0e15d93f6a5a13a26a /etc | |
parent | 4f96228201ba5406b69c0bd7bf67781017866d6e (diff) | |
download | pfsense-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')
-rw-r--r-- | etc/inc/config.inc | 8 |
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") ) { |