From 438e94f356bd6dc5a15f59eb41ef595f5f61bab6 Mon Sep 17 00:00:00 2001 From: Lord Anton Hvornum Date: Sat, 7 Apr 2018 00:41:01 +0200 Subject: Added --post=reboot as a default option. --- archinstall.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'archinstall.py') diff --git a/archinstall.py b/archinstall.py index 29e32f73..8a427c43 100644 --- a/archinstall.py +++ b/archinstall.py @@ -119,6 +119,7 @@ if __name__ == '__main__': if not 'hostname' in args: args['hostname'] = 'Arcinstall' if not 'country' in args: args['country'] = 'SE' #all if not 'packages' in args: args['packages'] = '' + if not 'post' in args: args['post'] = 'reboot' print(args) if not os.path.isfile(args['pwfile']): @@ -182,6 +183,7 @@ if __name__ == '__main__': o = run('arch-chroot /mnt locale-gen') o = run('arch-chroot /mnt chmod 700 /root') o = run('arch-chroot /mnt usermod --password {} root'.format(PIN)) + print(o) if 'user' in args: o = run('arch-chroot /mnt useradd -m -G wheel {user}'.format(**args)) o = run('arch-chroot /mnt usermod --password {pin} {user}'.format(**args, pin=PIN)) @@ -210,5 +212,7 @@ if __name__ == '__main__': entry.write('options cryptdevice=UUID={UUID}:luksdev root=/dev/mapper/luksdev rw intel_pstate=no_hwp\n'.format(UUID=UUID)) o = run('umount -R /mnt') - - print('Done. "reboot" when you\'re done tinkering.') + if args['post'] != 'stay': + o = run('reboot now') + else: + print('Done. "reboot" when you\'re done tinkering.') -- cgit v1.2.3-70-g09d2