index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Anton Hvornum <anton.feeds@gmail.com> | 2019-04-10 16:30:50 +0200 |
---|---|---|
committer | Anton Hvornum <anton.feeds@gmail.com> | 2019-04-10 16:30:50 +0200 |
commit | 64f5dd30bb4f89cadf7640e04cdad27315896a50 (patch) | |
tree | bdeb902cd876eaac56b07f214e217cde5c279f8f | |
parent | 4b7cabeab485e1ca0dae5f9e5646e74e97379cb9 (diff) |
-rw-r--r-- | archinstall.py | 16 |
diff --git a/archinstall.py b/archinstall.py index d2284e9d..59cdde3b 100644 --- a/archinstall.py +++ b/archinstall.py @@ -471,14 +471,6 @@ if __name__ == '__main__': o = run('arch-chroot /mnt locale-gen') o = run('arch-chroot /mnt chmod 700 /root') - ## == Passwords - # o = run('arch-chroot /mnt usermod --password {} root'.format(args['password'])) - # o = run("arch-chroot /mnt sh -c 'echo {pin} | passwd --stdin root'".format(pin='"{pin}"'.format(**args, pin=args['password'])), echo=True) - o = run("arch-chroot /mnt sh -c \"echo 'root:{pin}' | chpasswd\"".format(**args, pin=args['password'])) - if 'user' in args: - o = run('arch-chroot /mnt useradd -m -G wheel {user}'.format(**args)) - o = run("arch-chroot /mnt sh -c \"echo '{user}:{pin}' | chpasswd\"".format(**args, pin=args['password'])) - with open('/mnt/etc/mkinitcpio.conf', 'w') as mkinit: ## TODO: Don't replace it, in case some update in the future actually adds something. mkinit.write('MODULES=(btrfs)\n') @@ -560,6 +552,14 @@ if __name__ == '__main__': print('[W] Post install command failed: {}'.format(o.decode('UTF-8'))) #print(o) + ## == Passwords + # o = run('arch-chroot /mnt usermod --password {} root'.format(args['password'])) + # o = run("arch-chroot /mnt sh -c 'echo {pin} | passwd --stdin root'".format(pin='"{pin}"'.format(**args, pin=args['password'])), echo=True) + o = run("arch-chroot /mnt sh -c \"echo 'root:{pin}' | chpasswd\"".format(**args, pin=args['password'])) + if 'user' in args: + o = run('arch-chroot /mnt useradd -m -G wheel {user}'.format(**args)) + o = run("arch-chroot /mnt sh -c \"echo '{user}:{pin}' | chpasswd\"".format(**args, pin=args['password'])) + if args['post'] == 'reboot': o = run('umount -R /mnt') o = run('reboot now') |