diff --git a/scripts/main.sh b/scripts/main.sh index 0c98b4e..5f48140 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -54,12 +54,19 @@ function configure_base_system() { || die "Could not sed replace in /etc/conf.d/hostname" # Set timezone - 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 + 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