Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2019-04-10 16:30:50 +0200
committerAnton Hvornum <anton.feeds@gmail.com>2019-04-10 16:30:50 +0200
commit64f5dd30bb4f89cadf7640e04cdad27315896a50 (patch)
treebdeb902cd876eaac56b07f214e217cde5c279f8f
parent4b7cabeab485e1ca0dae5f9e5646e74e97379cb9 (diff)
Reorder of when password is set. And added a boot options to boot into the new OS without actually rebooting. To set up things like databases etc that needs services running
-rw-r--r--archinstall.py16
1 files changed, 8 insertions, 8 deletions
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')