Verified Commit b5877a9e authored by Kristian Klausen's avatar Kristian Klausen 🎉
Browse files

Use systemd-firstboot to set locale, timezone, hostname and keymap

parent 0fdc2131
......@@ -89,8 +89,9 @@ function postinstall() {
echo "COMPRESSION=\"xz\"" >>"${MOUNT}/etc/mkinitcpio.conf"
arch-chroot "${MOUNT}" /usr/bin/mkinitcpio -p linux
echo "archlinux" >"${MOUNT}/etc/hostname"
echo "KEYMAP=us" >"${MOUNT}/etc/vconsole.conf"
sed -i -e 's/^#\(en_US.UTF-8\)/\1/' "${MOUNT}/etc/locale.gen"
arch-chroot "${MOUNT}" /usr/bin/locale-gen
arch-chroot "${MOUNT}" /usr/bin/systemd-firstboot --locale=en_US.UTF-8 --timezone=UTC --hostname=archlinux --keymap=us
ln -sf /var/run/systemd/resolve/resolv.conf "${MOUNT}/etc/resolv.conf"
}
......
......@@ -3,11 +3,6 @@
set -e
set -x
ln -sf /usr/share/zoneinfo/UTC /etc/localtime
sed -i -e 's/^#\(en_US.UTF-8\)/\1/' /etc/locale.gen
locale-gen
echo 'LANG=en_US.UTF-8' >/etc/locale.conf
# setting the user credentials
useradd -m -U "${NEWUSER}"
echo -e "${NEWUSER}\n${NEWUSER}" | passwd "${NEWUSER}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment