Automatic timezone.

This commit is contained in:
Tommaso Chiti 2021-04-14 09:31:49 +02:00 committed by GitHub
parent fbbeb567fb
commit 0f5c97f380
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -89,7 +89,7 @@ read -r -p "Please enter the hostname: " hostname
echo $hostname > /mnt/etc/hostname echo $hostname > /mnt/etc/hostname
# Setting up locales. # Setting up locales.
read -r -p "Please insert the locale you use in this format (xx_XX): " locale read -r -p "Please insert the locale you use (format: xx_XX): " locale
echo "$locale.UTF-8 UTF-8" > /mnt/etc/locale.gen echo "$locale.UTF-8 UTF-8" > /mnt/etc/locale.gen
echo "LANG=$locale.UTF-8" > /mnt/etc/locale.conf echo "LANG=$locale.UTF-8" > /mnt/etc/locale.conf
@ -142,6 +142,9 @@ fi
# Configuring the system. # Configuring the system.
arch-chroot /mnt /bin/bash -e <<EOF arch-chroot /mnt /bin/bash -e <<EOF
# Setting up timezone.
timedatectl set-timezone "$(curl http://ip-api.com/line?fields=timezone)
# Setting up clock. # Setting up clock.
hwclock --systohc hwclock --systohc