From 9ee4e68cc649f8de91c821d19e35c51c7801297d Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Thu, 7 Jan 2021 13:12:45 +1300 Subject: [PATCH] print the usual stuff to the console on s390x for a non-interactive autoinstall --- subiquity/client/client.py | 16 ++++++++++++++++ subiquity/cmd/tui.py | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/subiquity/client/client.py b/subiquity/client/client.py index cdd56036..72f02238 100644 --- a/subiquity/client/client.py +++ b/subiquity/client/client.py @@ -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, diff --git a/subiquity/cmd/tui.py b/subiquity/cmd/tui.py index 33f55638..4417d6f3 100755 --- a/subiquity/cmd/tui.py +++ b/subiquity/cmd/tui.py @@ -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