amazon-linux-2023 icon indicating copy to clipboard operation
amazon-linux-2023 copied to clipboard

[Feature Request] - /etc/sysconfig/i18n and /etc/sysconfig/clock on al2022

Open liesenml opened this issue 3 years ago • 4 comments

liesenml avatar Dec 03 '21 20:12 liesenml

@liesenml both files are present since the first AL2022 release:

[~]$ cat /etc/sysconfig/i18n
LANG="en_US.UTF-8"
[~]$ cat /etc/sysconfig/clock
ZONE="UTC"
UTC=true

What features are you requesting? Thx!

elsaco avatar Dec 04 '21 20:12 elsaco

Hi, I'm a newbie of Amazon Linux 2022! I think both files are unnecessary. Why these files still existing? What's the purpose of these files?

FYR: https://forums.fedoraforum.org/showthread.php?285337-Fedora-18-changes-to-etc-sysconfig https://bugzilla.redhat.com/show_bug.cgi?id=871119 In Fedora:

$ cat /etc/system-release
Fedora release 37 (Thirty Seven)
$ ls -l /etc/sysconfig/i18n  /etc/sysconfig/clock 
ls: cannot access '/etc/sysconfig/i18n': No such file or directory
ls: cannot access '/etc/sysconfig/clock': No such file or directory

related info

  1. (not Amazon Linux 2022, but Amazon Linux 2..) /etc/sysconfig/clock is removed after yum update in Amazon Linux 2 https://jackiechen.blog/2020/02/21/etc-sysconfig-clock-is-removed-after-yum-update-in-amazon-linux-2/
  2. change log of old systemd from fedora https://koji.fedoraproject.org/koji/buildinfo?buildID=644461
* Wed Oct 24 2012 Kay Sievers <[email protected]> - 195-3
- Migrate /etc/sysconfig/ i18n, keyboard, network files/variables to
  systemd native files
...
...
* Thu Sep 20 2012 Lennart Poettering <[email protected]> - 190-1
- New upstream release
- Take possession of /etc/localtime, and remove /etc/sysconfig/clock

ghost avatar Nov 11 '22 14:11 ghost

Congrats for AL 2023 GA but these files are still existing. I would like to know the purpose of these.

$ cat /etc/os-release 
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
SUPPORT_END="2028-03-01"

$ head /etc/sysconfig/i18n /etc/sysconfig/clock 
==> /etc/sysconfig/i18n <==
LANG="en_US.UTF-8"

==> /etc/sysconfig/clock <==
ZONE="UTC"
UTC=true

ghost avatar Mar 18 '23 13:03 ghost

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/change-time-zone-of-instance.html In al2023, timedatectl won't manage /etc/sysconfig/clock. Its existence has become a bug

Python3.8 backports.zoneinfo library will report:

backports.zoneinfo._common.ZoneInfoNotFoundError: 'Multiple conflicting time zone configurations found:\n/etc/sysconfig/clock: UTC\n/etc/localtime is a symlink to: Asia/Shanghai\nFix the configuration, or set the time zone in a TZ environment variable.\n'

OneMoreSecond avatar Apr 30 '25 09:04 OneMoreSecond