Skip to content

timedated: make sure to create /etc/timezone if it does not exist

Pablo Correa Gomez requested to merge timezone-fixes into main

The file was expected to exist, and was indeed created if the Timezone was set through DBus. But that file does not exist by default in alpine linux installations, so make sure that it's created at the startup, before the DBus name is claimed. Its contents are filled from the suffix of the link pointed by /etc/localtime, which does exist in alpine installations that have run setup-timezone.

I guess the other alternative is to not depend on /etc/timezone, and make it possible to just use the suffix of the link pointed by /etc/localtime. I'm fine with both.

EDIT: This is fixing the crashes of GNOME calendar on fresh pmOS installations, and the reason why I figured it out.

Fixes pmaports#1394 (closed)

Edited by Pablo Correa Gomez

Merge request reports