Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/systemd.py
diff options
context:
space:
mode:
Diffstat (limited to 'archinstall/lib/systemd.py')
-rw-r--r--archinstall/lib/systemd.py13
1 files changed, 9 insertions, 4 deletions
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: