index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2022-05-28 10:36:38 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2022-05-28 10:36:38 +0200 |
commit | faf925de1882be722d2994d697a802918282e509 (patch) | |
tree | 4856c76b10b36e94875ce3c9add961960bb23bf0 /archinstall/lib/systemd.py | |
parent | 3801bee921d22e23435c781c469d9ec0adfa00bd (diff) | |
parent | 78449f75bc44f0e2b03cb9d909b9b78e4f7ca4c8 (diff) |
-rw-r--r-- | archinstall/lib/systemd.py | 13 |
diff --git a/archinstall/lib/systemd.py b/archinstall/lib/systemd.py index 417870da..3d2f0385 100644 --- a/archinstall/lib/systemd.py +++ b/archinstall/lib/systemd.py @@ -91,20 +91,25 @@ class Boot: log(f"The error above occured in a temporary boot-up of the installation {self.instance}", level=logging.ERROR, fg="red") shutdown = None + shutdown_exit_code = -1 try: shutdown = SysCommand(f'systemd-run --machine={self.container_name} --pty shutdown now') except SysCallError as error: - if error.exit_code == 256: - pass + shutdown_exit_code = error.exit_code + # if error.exit_code == 256: + # pass while self.session.is_alive(): time.sleep(0.25) - if self.session.exit_code == 0 or (shutdown and shutdown.exit_code == 0): + if shutdown: + shutdown_exit_code = shutdown.exit_code + + if self.session.exit_code == 0 or shutdown_exit_code == 0: storage['active_boot'] = None else: - raise SysCallError(f"Could not shut down temporary boot of {self.instance}: {shutdown}", exit_code=shutdown.exit_code) + raise SysCallError(f"Could not shut down temporary boot of {self.instance}: {self.session.exit_code}/{shutdown_exit_code}", exit_code=next(filter(bool, [self.session.exit_code, shutdown_exit_code]))) def __iter__(self) -> Iterator[str]: if self.session: |