Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorLord Anton Hvornum <anton.feeds@gmail.com>2018-04-07 23:32:49 +0200
committerLord Anton Hvornum <anton.feeds@gmail.com>2018-04-07 23:32:49 +0200
commite395962fe22305755a5dc6b5c3650d12cf5b3604 (patch)
tree235ca02c1af2a006f2314f6f095478512fc9865c /archinstall.py
parent82fe1585529f31445fd14ff7fa933d8d732d678f (diff)
Fixed password change for custom user as well as hostname and locale gen.
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/archinstall.py b/archinstall.py
index 42096b2a..dad42737 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -212,8 +212,10 @@ if __name__ == '__main__':
o = run('arch-chroot /mnt rm /etc/localtime')
o = run('arch-chroot /mnt ln -s /usr/share/zoneinfo/Europe/Stockholm /etc/localtime')
o = run('arch-chroot /mnt hwclock --hctosys --localtime')
- o = run('arch-chroot /mnt echo "{hostname}" > /etc/hostname'.format(**args))
- o = run("arch-chroot /mnt sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen")
+ #o = run('arch-chroot /mnt echo "{hostname}" > /etc/hostname'.format(**args))
+ #o = run("arch-chroot /mnt sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen")
+ o = run("arch-chroot /mnt sh -c \"echo '{hostname}' > /etc/hostname\"".format(**args))
+ o = run("arch-chroot /mnt sh -c \"echo -n 'en_US.UTF-8' > /etc/locale.gen\"")
o = run('arch-chroot /mnt locale-gen')
o = run('arch-chroot /mnt chmod 700 /root')
@@ -223,7 +225,7 @@ if __name__ == '__main__':
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))
+ o = run("arch-chroot /mnt sh -c \"echo '{user}:{pin}' | chpasswd\"".format(**args, pin=PIN))
with open('/mnt/etc/mkinitcpio.conf', 'w') as mkinit:
## TODO: Don't replace it, in case some update in the future actually adds something.