Fix crash with autoinstall on non-systemd env
On WSL and any system without systemd the server crashes becauses the syslog id is always set (and never None) and systemd cat cannot connect to the journal. We cant set the id to None because the API expects a string, so the check "is not None" is always true. Co-authored-by: Didier Roche <didrocks@ubuntu.com>
This commit is contained in:
parent
636b4401d2
commit
6cc8c6169b
|
@ -60,7 +60,7 @@ class CmdListController(NonInteractiveController):
|
|||
with context.child("command_{}".format(i), desc):
|
||||
if isinstance(cmd, str):
|
||||
cmd = ['sh', '-c', cmd]
|
||||
if self.syslog_id is not None:
|
||||
if self.syslog_id:
|
||||
journal.send(
|
||||
" running " + desc, SYSLOG_IDENTIFIER=self.syslog_id)
|
||||
cmd = [
|
||||
|
|
|
@ -55,6 +55,9 @@ class SystemSetupServer(SubiquityServer):
|
|||
|
||||
def __init__(self, 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):
|
||||
self.set_source_variant("wsl_configuration")
|
||||
|
||||
|
|
Loading…
Reference in New Issue