feat: support musl timezone

This commit is contained in:
thiblizz 2023-11-05 15:12:09 +01:00
parent f5ba6e5147
commit de8c16211b
1 changed files with 14 additions and 7 deletions

View File

@ -54,12 +54,19 @@ function configure_base_system() {
|| die "Could not sed replace in /etc/conf.d/hostname"
# Set timezone
if [[ $MUSL == "true" ]]; then
try emerge -v sys-libs/timezone-data
einfo "Selecting timezone"
echo -e "\nTZ=\"$TIMEZONE\"" >> /etc/env.d/00musl \
|| die "Could not write to /etc/env.d/00musl"
else
einfo "Selecting timezone"
echo "$TIMEZONE" > /etc/timezone \
|| die "Could not write /etc/timezone"
chmod 644 /etc/timezone \
|| die "Could not set correct permissions for /etc/timezone"
try emerge -v --config sys-libs/timezone-data
fi
# Set keymap
einfo "Selecting keymap"
@ -390,7 +397,7 @@ EOF
# Install authorized_keys before dracut, which might need them for remote unlocking.
install_authorized_keys
# Install required programs and kernel now, in oder to
# Install required programs and kernel now, in order to
# prevent emerging module before an imminent kernel upgrade
try emerge --verbose sys-kernel/dracut sys-kernel/gentoo-kernel-bin app-arch/zstd