diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-11-28 17:34:47 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-11-28 17:34:47 -0500 |
commit | 70bea648be3ab81ca8f8062f37b25ddefcbf5f30 (patch) | |
tree | b8b73cb11f997bd242d79d366a9a0a41e6aff2ab /etc/ecl.php | |
parent | b3405363b90773d69b8de22ef027e0157509d74f (diff) | |
download | pfsense-70bea648be3ab81ca8f8062f37b25ddefcbf5f30.zip pfsense-70bea648be3ab81ca8f8062f37b25ddefcbf5f30.tar.gz |
Cleanup
Diffstat (limited to 'etc/ecl.php')
-rwxr-xr-x | etc/ecl.php | 9 |
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"); } |