Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2019-04-11 22:43:05 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2019-04-11 22:43:05 +0200
commit90b6c5c8f78df7cbdcf0ffd89846f3d04be46bd4 (patch)
tree10b08da5bfd251b570d2f4d95d9e0ab8a6fcaa35 /archinstall.py
parent21322ecadbe4b47b429cbdb66a1a8065200111e0 (diff)
Final touches on the new subsystem thing
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/archinstall.py b/archinstall.py
index f1a33d4e..665fcb21 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -168,13 +168,20 @@ class sys_command():
lower = output.lower()
if 'triggers' in self.opts:
for trigger in self.opts['triggers']:
- print(trigger.lower(),'vs', lower)
if trigger.lower() in lower:
print('[N] Writing to subsystem: {}'.format(self.opts['triggers'][trigger]))
os.write(child_fd, self.opts['triggers'][trigger])
+ del(self.opts['triggers'][trigger])
+ if len(self.opts['triggers']) == 0:
+ alive = False
+ break
yield output
+ # Since we're in a subsystem, we gotta bail out!
+ # Bail bail bail!
+ os.write(child_fd, b'shutdown now')
+
exit_code = os.waitpid(self.pid, 0)[1]
if exit_code != 0:
print('[E] Command "{}" exited with status code:'.format(self.cmd[0]), exit_code)