On 8/27/19 10:01 AM, Bruce Dubbs via blfs-support wrote:
On 8/27/19 2:54 AM, Pierre Labastie via blfs-support wrote:

Also, changing /etc/localtime to a symlink has an immediate effect of changing the clock to the right timezone (that's really amazing, at the time you hit
return, the clock changes), thanks Bruce. I think we should change
/etc/localtime to a symlink in the Sysv book.

That would be in LFS Chapter 6 glibc.

It's curious why /etc/localtime needs to be a symlink.  If the file is just opened, the kernel should follow the symlink and do the right thing.  lxde and xfce do not have the problem and neither does xclock. Something in gnome and, IIRC, plasma, is looking specifically for a symlink.

The reason for using a cp instead of ln in the glibc instructions is to keep the time right in the unusual case that /usr is not mounted.  Even if /usr is on a separate partition it is almost always mounted early (mount is the 7th bootscript) unless there is a problem.

I think I once did something like:

mv /etc/localtime /etc/localtime.file
ln -s  localtime.file /etc/localtime

but that's not a good solution for the book.

What do others think?  Should we just change LFS from

cp -v /usr/share/zoneinfo/<xxx> /etc/localtime

to

ln -sf /usr/share/zoneinfo/<xxx> /etc/localtime

I believe this is the best solution, and it's consistent with the systemd book and can remove another difference.


--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to