Merge pull request #1075 from canonical/wsl-fix-autoinstall

Fix crash with autoinstall on non-systemd env
This commit is contained in:
Dan Bungert 2021-10-04 07:20:03 -06:00 committed by GitHub
commit 5cbecaea35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class CmdListController(NonInteractiveController):
with context.child("command_{}".format(i), desc): with context.child("command_{}".format(i), desc):
if isinstance(cmd, str): if isinstance(cmd, str):
cmd = ['sh', '-c', cmd] cmd = ['sh', '-c', cmd]
if self.syslog_id is not None: if self.syslog_id:
journal.send( journal.send(
" running " + desc, SYSLOG_IDENTIFIER=self.syslog_id) " running " + desc, SYSLOG_IDENTIFIER=self.syslog_id)
cmd = [ cmd = [

View File

@ -55,6 +55,9 @@ class SystemSetupServer(SubiquityServer):
def __init__(self, opts, block_log_dir): def __init__(self, opts, block_log_dir):
super().__init__(opts, block_log_dir) super().__init__(opts, block_log_dir)
self.echo_syslog_id = ""
self.event_syslog_id = ""
self.log_syslog_id = ""
if is_reconfigure(opts.dry_run): if is_reconfigure(opts.dry_run):
self.set_source_variant("wsl_configuration") self.set_source_variant("wsl_configuration")