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 21:18:16 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2019-04-11 21:18:16 +0200
commit5b44456a55f30ca554cb94040e9da3814d8c7dc7 (patch)
treede437c1c5920ee812b88353895036e25bb1a2fd9 /archinstall.py
parent80d7fca43d73bde4576f239c95e94388cc2b1a23 (diff)
Editing more outputs
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/archinstall.py b/archinstall.py
index f76911a8..af86ed37 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -249,7 +249,10 @@ def grab_partitions(dev):
## and make sys_command() return the exit-code, way safer than checking output strings :P
return {}
- print(o)
+ if not o[:1] == b'{':
+ print('[E] Error in getting blk devices:', o)
+ exit(1)
+
r = json.loads(o.decode('UTF-8'))
if len(r['blockdevices']) and 'children' in r['blockdevices'][0]:
for part in r['blockdevices'][0]['children']:
@@ -460,8 +463,9 @@ if __name__ == '__main__':
# "--cipher sha512" breaks the shit.
# TODO: --use-random instead of --use-urandom
print('[N] Adding encryption to {drive}{partition_2}.'.format(**args))
- o = sys_command('/usr/bin/cryptsetup -q -v --type luks2 --pbkdf argon2i --hash sha512 --key-size 512 --iter-time 10000 --key-file {pwfile} --use-urandom luksFormat {drive}{partition_2}'.format(**args)).exec()
- if not 'Command successful.' in b''.join(o).decode('UTF-8').strip():
+ o = b''.join(sys_command('/usr/bin/cryptsetup -q -v --type luks2 --pbkdf argon2i --hash sha512 --key-size 512 --iter-time 10000 --key-file {pwfile} --use-urandom luksFormat {drive}{partition_2}'.format(**args)).exec())
+ print(o)
+ if not b'Command successful.' in o:
print('[E] Failed to setup disk encryption.', o)
exit(1)