Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorLord Anton Hvornum <anton.feeds@gmail.com>2018-04-07 14:09:25 +0200
committerLord Anton Hvornum <anton.feeds@gmail.com>2018-04-07 14:23:23 +0200
commit17c810d897505949b547a3c0ed555cedf9b4acdf (patch)
treee9628d6286e77f731cfb3f14bba2e2b1d9149be2 /archinstall.py
parent22f4963dd28106dda9fe8b875b1ccfad7dd7d3c2 (diff)
more debug
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/archinstall.py b/archinstall.py
index d8de16b1..2e1f30c6 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -41,13 +41,15 @@ def get_local_MACs():
macs[addr.address] = nic
return macs
-def run(cmd):
+def run(cmd, echo=False):
#print('[!] {}'.format(cmd))
handle = Popen(cmd, shell='True', stdout=PIPE, stderr=STDOUT)
output = b''
while handle.poll() is None:
data = handle.stdout.read()
if len(data):
+ if echo:
+ print(data.decode('UTF-8', end=''))
# print(data.decode('UTF-8'), end='')
output += data
output += handle.stdout.read()
@@ -253,13 +255,14 @@ if __name__ == '__main__':
print('[N] No instructions for this box on this mac: {}'.format(mac))
continue
- print('Decoding:', instructions)
+ #print('Decoding:', instructions)
instructions = json.loads(instructions.decode('UTF-8'), object_pairs_hook=oDict)
for title in instructions:
print('[N] {}'.format(title))
for command in instructions[title]:
- o = run('arch-chroot /mnt {c}'.format(c=command))
+ print('[N] Command: {}'.format(command))
+ o = run('arch-chroot /mnt {c}'.format(c=command), echo=True)
if instructions[title][command] and not instructions[title][command] in o:
print('[W] Post install command failed: {}'.format(o.decode('UTF-8')))
#print(o)