split install into phases

this is to prevent catch 22 between copy_conf and app_defaults
This commit is contained in:
Matthew Vale
2015-12-03 14:04:27 +00:00
3 changed files with 22 additions and 10 deletions
@@ -181,14 +181,18 @@ include "root.php";
}
}
function install() {
$this->write_progress("Install started for switch");
function install_phase_1() {
$this->write_progress("Install phase 1 started for switch");
$this->copy_conf();
$this->copy_scripts();
$this->write_progress("Install phase 1 completed for switch");
}
function install_phase_1() {
$this->write_progress("Install phase 2 started for switch");
$this->create_config_lua();
save_switch_xml();
$this->restart_switch();
$this->write_progress("Install completed for switch");
$this->write_progress("Install phase 2 completed for switch");
}
function upgrade() {