summaryrefslogtreecommitdiffstats
path: root/etc/ecl.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-11-28 17:34:47 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-11-28 17:34:47 -0500
commit70bea648be3ab81ca8f8062f37b25ddefcbf5f30 (patch)
treeb8b73cb11f997bd242d79d366a9a0a41e6aff2ab /etc/ecl.php
parentb3405363b90773d69b8de22ef027e0157509d74f (diff)
downloadpfsense-70bea648be3ab81ca8f8062f37b25ddefcbf5f30.zip
pfsense-70bea648be3ab81ca8f8062f37b25ddefcbf5f30.tar.gz
Cleanup
Diffstat (limited to 'etc/ecl.php')
-rwxr-xr-xetc/ecl.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/etc/ecl.php b/etc/ecl.php
index 5797cca..6d9a7e7 100755
--- a/etc/ecl.php
+++ b/etc/ecl.php
@@ -68,7 +68,7 @@ function discover_config($mountpoint) {
global $g, $debug;
$locations_to_check = array("/", "/config");
foreach($locations_to_check as $ltc) {
- $tocheck = "/tmp/mnt/cf/{$ltc}/config.xml";
+ $tocheck = "/tmp/mnt/cf{$ltc}config.xml";
if($debug) {
echo "\nChecking for $tocheck";
if(file_exists($tocheck))
@@ -132,11 +132,14 @@ function find_config_xml() {
if($config_location) {
if(test_config($config_location)) {
// We have a valid configuration. Install it.
- echo " -> found config.xml ";
+ echo " -> found config.xml\n";
+ echo "Backing up old configuration...\n";
backup_config();
+ echo "Restoring {$config_location}...\n";
restore_backup($config_location);
+ echo "Cleaning up...\n";
exec("/sbin/umount /tmp/mnt/cf");
- break;
+ exit;
}
exec("/sbin/umount /tmp/mnt/cf");
}
OpenPOWER on IntegriCloud