On Mi, 09.09.20 09:23, Colin Guthrie (gmane@xxxxxxxxxxxxxx) wrote: > Alvin Šipraga wrote on 08/09/2020 22:54: > > Hi, > > > > On 9/8/20 4:12 PM, Colin Guthrie wrote: > > > >> 2. Set your /etc/ master image to make /etc/localtime to be a symlink to > >> /run/localtime and then ensure /run/localtime is a symlink to the > >> appropriate file in /usr during early boot (e.g. in initramfs). Then > >> when you want to to change the timezone, just update the /run/ symlink. > > This might not work as expected - systemd sometimes assumes that > > /etc/localtime is a symlink into /usr/share/zoneinfo and will not > > understand double symlinks. See src/basic/time-util.c:get_timezone() for > > at least one example. > > But that really depends on what you define as "not work". Sure > timedatectl may not report correctly, but that shouldn't matter too much > if you're not using to query or update (the latter obviously won't work > anyway), but for the purposes of software *using* the timezone, I don't > tihnk anything will actually break. Actually, that's not quite true: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx/message/TVVXVO5HJGH5JOAWJJDJNA3BPBPPRS37/ (This is a current thread on the fedora ML) glibc doesn't care what /etc/localtime is, but all code that wants to know the timezone name, i.e. a string like "Europe/Berlin" generally requires /etc/symlink to be a readable symlink. https://www.freedesktop.org/software/systemd/man/localtime.html Lennart -- Lennart Poettering, Berlin _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel