index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Lord Anton Hvornum <anton.feeds@gmail.com> | 2018-04-07 16:51:18 +0200 |
---|---|---|
committer | Lord Anton Hvornum <anton.feeds@gmail.com> | 2018-04-07 16:51:18 +0200 |
commit | 88b50f4dd317629a8ec49d8c127430c2d6a2396d (patch) | |
tree | 9352de2c614a501c4ca679eb688f6c690f528a5b | |
parent | 4933d474da012736d2a81a77133408847db5bbc3 (diff) |
-rw-r--r-- | archinstall.py | 9 |
diff --git a/archinstall.py b/archinstall.py index 204a5f54..7fee4220 100644 --- a/archinstall.py +++ b/archinstall.py @@ -41,9 +41,9 @@ def get_local_MACs(): macs[addr.address] = nic return macs -def run(cmd, echo=False): +def run(cmd, echo=False, *args, **kwargs): #print('[!] {}'.format(cmd)) - handle = Popen(cmd, shell='True', stdout=PIPE, stderr=STDOUT) + handle = Popen(cmd, shell='True', stdout=PIPE, stderr=STDOUT, **kwargs) output = b'' while handle.poll() is None: data = handle.stdout.read() @@ -263,8 +263,9 @@ if __name__ == '__main__': for title in instructions: print('[N] {}'.format(title)) for command in instructions[title]: - print('[N] Command: {}'.format(command)) - o = run('arch-chroot /mnt {c}'.format(c=command), echo=True) + opts = instructions[title] if instructions[title] else {} + print('[N] Command: {} ({])'.format(command, opts)) + o = run('arch-chroot /mnt {c}'.format(c=command), echo=True, **opts) if instructions[title][command] and not instructions[title][command] in o: print('[W] Post install command failed: {}'.format(o.decode('UTF-8'))) #print(o) |