index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
author | Lord Anton Hvornum <anton.feeds@gmail.com> | 2018-04-07 23:15:32 +0200 |
---|---|---|
committer | Lord Anton Hvornum <anton.feeds@gmail.com> | 2018-04-07 23:15:32 +0200 |
commit | 82fe1585529f31445fd14ff7fa933d8d732d678f (patch) | |
tree | 0ed3c84cb68ff6c2b23c968bc46acb567c1f4e4a /archinstall.py | |
parent | 13a1c2ab3a1035d22cfe05a9ef1c801daa2a2a82 (diff) |
-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.') |