index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall.py | 22 |
diff --git a/archinstall.py b/archinstall.py index b43c7e2f..42096b2a 100644 --- a/archinstall.py +++ b/archinstall.py @@ -218,11 +218,9 @@ if __name__ == '__main__': o = run('arch-chroot /mnt chmod 700 /root') ## == Passwords - #o = run('arch-chroot /mnt usermod --password {} root'.format(PIN)) - #TODO: This doesn't work either: (why the hell not?) - # echo "newpass" | passwd --stdin root ? - #o = run("arch-chroot /mnt echo 'root:{pin}' | chpasswd".format(**args, pin=PIN)) - o = run("arch-chroot /mnt sh -c 'echo {pin} | passwd --stdin root'".format(pin='"{pin}"'.format(**args, pin=PIN)), echo=True) + # o = run('arch-chroot /mnt usermod --password {} root'.format(PIN)) + # o = run("arch-chroot /mnt sh -c 'echo {pin} | passwd --stdin root'".format(pin='"{pin}"'.format(**args, pin=PIN)), echo=True) + o = run("arch-chroot /mnt sh -c \"echo 'root:{pin}' | chpasswd\"".format(**args, pin=PIN)) if 'user' in args: o = run('arch-chroot /mnt useradd -m -G wheel {user}'.format(**args)) o = run("arch-chroot /mnt echo '{user}:{pin}' | chpasswd".format(**args, pin=PIN)) @@ -265,18 +263,18 @@ if __name__ == '__main__': instructions = json.loads(instructions.decode('UTF-8'), object_pairs_hook=oDict) for title in instructions: - print('[N] {}'.format(title)) + print('[N] Network Deploy: {}'.format(title)) for command in instructions[title]: opts = instructions[title][command] if type(instructions[title][command]) in (dict, oDict) else {} - print('[N] Command: {} ({})'.format(command, opts)) + #print('[N] Command: {} ({})'.format(command, opts)) o = run('arch-chroot /mnt {c}'.format(c=command), **opts) if type(instructions[title][command]) == bytes and len(instructions[title][command]) and not instructions[title][command] in o: print('[W] Post install command failed: {}'.format(o.decode('UTF-8'))) #print(o) - #o = run('umount -R /mnt') - #if args['post'] == 'reboot': - # o = run('reboot now') - #else: - # print('Done. "reboot" when you\'re done tinkering.') + o = run('umount -R /mnt') + if args['post'] == 'reboot': + o = run('reboot now') + else: + print('Done. "reboot" when you\'re done tinkering.') |