print the usual stuff to the console on s390x for a non-interactive autoinstall

This commit is contained in:
Michael Hudson-Doyle 2021-01-07 13:12:45 +13:00
parent a3444d6f56
commit 9ee4e68cc6
2 changed files with 16 additions and 16 deletions

View File

@ -257,6 +257,22 @@ class SubiquityClient(TuiApplication):
status = await self.connect()
self.interactive = status.interactive
if self.interactive:
if self.opts.ssh:
from subiquity.ui.views.help import (
ssh_help_texts, get_installer_password)
from subiquitycore.ssh import get_ips_standalone
texts = ssh_help_texts(
get_ips_standalone(),
get_installer_password(self.opts.dry_run))
for line in texts:
if hasattr(line, 'text'):
if line.text.startswith('installer@'):
print(' ' * 4 + line.text)
else:
print(line.text)
else:
print(line)
return
await super().start()
journald_listen(
self.aio_loop,

View File

@ -118,22 +118,6 @@ def main():
logger.info("Starting Subiquity revision {}".format(version))
logger.info("Arguments passed: {}".format(sys.argv))
if opts.ssh:
from subiquity.ui.views.help import (
ssh_help_texts, get_installer_password)
from subiquitycore.ssh import get_ips_standalone
texts = ssh_help_texts(
get_ips_standalone(), get_installer_password(opts.dry_run))
for line in texts:
if hasattr(line, 'text'):
if line.text.startswith('installer@'):
print(' ' * 4 + line.text)
else:
print(line.text)
else:
print(line)
return 0
if opts.answers is None and os.path.exists(AUTO_ANSWERS_FILE):
logger.debug("Autoloading answers from %s", AUTO_ANSWERS_FILE)
opts.answers = AUTO_ANSWERS_FILE