base-files: fix zoneinfo support
authorRosen Penev <rosenp@gmail.com>
Sat, 10 Apr 2021 00:22:48 +0000 (17:22 -0700)
committerPaul Spooren <mail@aparcar.org>
Thu, 24 Jun 2021 01:44:30 +0000 (15:44 -1000)
commitc88bdb8294a73e0eaa3cd86e843564a8244b333c
tree0c5d18b7131c7324e91a621981217a2d2477044a
parent15612706c930ed26af9e05b649efc2d245157273
base-files: fix zoneinfo support

The system init script currently sets /tmp/localinfo when zoneinfo is
populated. However, zoneinfo has spaces in it whereas the actual files
have _ instead of spaces. This made the if condition never return true.

Example failure when removing the if condition:

/tmp/localtime -> /usr/share/zoneinfo/America/Los Angeles

This file does not exist. America/Los_Angeles does.

Ran through shfmt -w -ci -bn -sr -s

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 8af62ede189aa504135db05474d34c9f8a1ed35d)
package/base-files/files/etc/init.d/system