minor fixes in installation process
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -57,12 +57,16 @@ final class InstallCommand extends Command
|
||||
{
|
||||
$result = self::SUCCESS;
|
||||
|
||||
if ($input->getOption('create-userdata-from-str') !== false) {
|
||||
if ($input->getOption('create-userdata-from-str') !== null) {
|
||||
$ud_str = $input->getOption('create-userdata-from-str');
|
||||
$ud_dec = json_decode(base64_decode($ud_str), true);
|
||||
$core = new Core($ud_dec);
|
||||
$core->createUserdataConf();
|
||||
return $result;
|
||||
$ud_dec = @json_decode(@base64_decode($ud_str), true);
|
||||
if (is_array($ud_dec) && !empty($ud_dec) && count($ud_dec) == 8) {
|
||||
$core = new Core($ud_dec);
|
||||
$core->createUserdataConf();
|
||||
return $result;
|
||||
}
|
||||
$output->writeln("<error>Invalid parameter value.</>");
|
||||
return self::INVALID;
|
||||
}
|
||||
|
||||
session_start();
|
||||
@@ -130,6 +134,7 @@ final class InstallCommand extends Command
|
||||
$this->io->info('Running unattended installation');
|
||||
} else {
|
||||
$extended = $this->io->confirm('Use advanced installation mode?', false);
|
||||
$decoded_input = [];
|
||||
}
|
||||
|
||||
$result = $this->showStep(0, $extended, $decoded_input);
|
||||
@@ -246,7 +251,7 @@ final class InstallCommand extends Command
|
||||
if ($step == 3) {
|
||||
// do actual install with data from $this->formfielddata
|
||||
$core = new Core($this->formfielddata);
|
||||
$core->doInstall();
|
||||
$core->doInstall(false);
|
||||
$core->createUserdataConf();
|
||||
}
|
||||
return $this->showStep(++$step, $extended, $decoded_input);
|
||||
|
||||
Reference in New Issue
Block a user