From 6b65f407833dd736a3babc17362d050fb1f5e795 Mon Sep 17 00:00:00 2001 From: YellowJacketLinux Date: Sat, 12 Oct 2024 15:59:47 -0700 Subject: [PATCH] more local configurations --- CH9Config/00-Generic.sh | 29 +++++++++++++++++++++++++++++ CH9Config/01-NetworkConfig.sh | 13 +++++++++++++ 2 files changed, 42 insertions(+) diff --git a/CH9Config/00-Generic.sh b/CH9Config/00-Generic.sh index 04d1d27..0cae9e0 100644 --- a/CH9Config/00-Generic.sh +++ b/CH9Config/00-Generic.sh @@ -8,6 +8,35 @@ echo "localhost" > /etc/hostname echo FONT=Lat2-Terminus16 > /etc/vconsole.conf +cat > /etc/locale.conf << "EOF" +LANG="en_US.UTF-8" +EOF + +# /etc/profile + +cat > /etc/profile << "EOF" +# Begin /etc/profile + +for i in $(locale); do + unset ${i%=*} +done + +if [[ "$TERM" = linux ]]; then + export LANG=C.UTF-8 +else + source /etc/locale.conf + + for i in $(locale); do + key=${i%=*} + if [[ -v $key ]]; then + export $key + fi + done +fi + +# End /etc/profile +EOF + # /etc/inputrc cat > /etc/inputrc << "EOF" diff --git a/CH9Config/01-NetworkConfig.sh b/CH9Config/01-NetworkConfig.sh index a9dec07..c16f86f 100644 --- a/CH9Config/01-NetworkConfig.sh +++ b/CH9Config/01-NetworkConfig.sh @@ -44,6 +44,19 @@ DHCP=ipv4 EOF # auto-update "make-ca" certificate bundle systemctl enable update-pki.timer + # + # Below has to be run after booting, not from chroot + # It makes sure timedatectl knows my hardware clock is UTC and then + # identifies my local timezone as America/Los_Angeles + # (often incorrectly called "Pacific Time") + # + cat > /root/timedatectl.sh << "EOF" +#!/bin/bash +timedatectl set-local-rtc 1 +if [ $? -eq 0 ]; then + timedatectl set-timezone America/Los_Angeles +fi +EOF else # bootable USB thumb drive echo "lfsusb" > /etc/hostname