index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Werner Llácer <wllacer@gmail.com> | 2022-02-03 00:02:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-03 00:02:30 +0100 |
commit | 3cd7dc24c7ebe8911978380d75fd79e0c581060a (patch) | |
tree | 1aa329b24f0eb41289f3b60d67218604e49b5873 /archinstall/lib/systemd.py | |
parent | 389feef035cfbb1bd2c4f8be070fa085c088f151 (diff) |
-rw-r--r-- | archinstall/lib/systemd.py | 11 |
diff --git a/archinstall/lib/systemd.py b/archinstall/lib/systemd.py index 44e634fe..417870da 100644 --- a/archinstall/lib/systemd.py +++ b/archinstall/lib/systemd.py @@ -90,11 +90,18 @@ class Boot: log(args[1], level=logging.ERROR, fg='red') log(f"The error above occured in a temporary boot-up of the installation {self.instance}", level=logging.ERROR, fg="red") - shutdown = SysCommand(f'systemd-run --machine={self.container_name} --pty /bin/bash -c "shutdown now"') + shutdown = None + + try: + shutdown = SysCommand(f'systemd-run --machine={self.container_name} --pty shutdown now') + except SysCallError as error: + if error.exit_code == 256: + pass + while self.session.is_alive(): time.sleep(0.25) - if shutdown.exit_code == 0: + if self.session.exit_code == 0 or (shutdown and 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) |