From 9b1310ead83bcbcc9327436c62b0edc5e5d91b67 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 9 Jun 2019 20:25:20 +0200 Subject: Added sorted drives and partition debug information --- archinstall.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'archinstall.py') diff --git a/archinstall.py b/archinstall.py index 9fb0f22c..72ba3dc4 100644 --- a/archinstall.py +++ b/archinstall.py @@ -397,7 +397,7 @@ if __name__ == '__main__': exit(1) ## Setup some defaults (in case no command-line parameters or netdeploy-params were given) - if not 'drive' in args: args['drive'] = list(harddrives.keys())[0] # First drive found + if not 'drive' in args: args['drive'] = sorted(list(harddrives.keys()))[0] # First drive found if not 'size' in args: args['size'] = '100%' if not 'start' in args: args['start'] = '513MiB' if not 'pwfile' in args: args['pwfile'] = '/tmp/diskpw' @@ -526,6 +526,9 @@ if __name__ == '__main__': o = b''.join(sys_command('/usr/bin/parted -s {drive} mkpart primary {start} {size}'.format(**args)).exec()) args['paritions'] = grab_partitions(args['drive']) + print(f'Partitions: (Boot: {list(args['paritions'].keys())[0]})') + print(json.dumps(args['paritions'], indent=4)) + if len(args['paritions']) <= 0: print('[E] No paritions were created on {drive}'.format(**args), o) exit(1) @@ -720,8 +723,8 @@ if __name__ == '__main__': ## since we set the password as the last step. And then the command itself which will be executed by looking for: ## [root@ ~]# o = b''.join(sys_command('/usr/bin/systemd-nspawn -D /mnt -b --machine temporary', opts={'triggers' : { - bytes(f'login:', 'UTF-8') : b'root\n', # {args["hostname"]} login: - #b'Password' : bytes(args['password']+'\n', 'UTF-8'), + bytes(f'{args["hostname"]} login', 'UTF-8') : b'root\n', + b'Password' : bytes(args['password']+'\n', 'UTF-8'), bytes(f'[root@{args["hostname"]} ~]#', 'UTF-8') : bytes(command+'\n', 'UTF-8'), }, **opts}).exec()) -- cgit v1.2.3-70-g09d2