From d338b5f51e2fbfd50a519ce44dee6e6b466d1d54 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Thu, 20 Jun 2019 19:01:34 +0000 Subject: Fixing some logic issues in sys_command --- archinstall.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/archinstall.py b/archinstall.py index 22993f7f..ab9faada 100644 --- a/archinstall.py +++ b/archinstall.py @@ -220,6 +220,22 @@ class sys_command(): # Since we're in a subsystem, we gotta bail out! # Bail bail bail! os.write(child_fd, b'shutdown now\n') + print('[N] Shutdown initated') + last = time() + while time()-last < 5: + for fileno, event in poller.poll(0.1): + try: + output = os.read(child_fd, 8192).strip() + trace_log += output + except OSError: + last = time() - 60 + break + + if 'debug' in self.opts and self.opts['debug']: + if len(output): + print(output) + + last = time() if 'debug' in self.opts and self.opts['debug']: print('[N] Waiting for exit code.') -- cgit v1.2.3-70-g09d2