]> git.proxmox.com Git - pve-container.git/commit
setup: also set contents of /etc/timezone
authorFabian Ebner <f.ebner@proxmox.com>
Thu, 7 Oct 2021 10:48:03 +0000 (12:48 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 7 Oct 2021 12:32:42 +0000 (14:32 +0200)
commit6007e81beb67c97e9cadd770c04df4f89e4a7ecb
tree03e81fdb89542959a4d2e9f7e2d353ff5b9b4106
parentdb35d9f3377a70a47ce34fdc160b8ada057ad4cb
setup: also set contents of /etc/timezone

Some distributions like CentOS 8 and Gentoo don't have the file, so
only update if it already existed.

A slight change in behavior in set_timezone is that the warning will
now trigger if /etc/localtime is a link to $tz_path, but $tz_path does
not exist. Previously, it would return early if the link matched.

Programs that rely on /etc/timezone within the container will now see
the configured timezone too. While that is more correct, it's still a
change that might be unexpected.

Reported in the community forum:
https://forum.proxmox.com/threads/pct-create-command-with-timezone-host-option-fails-to-create-a-container.97538/

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
src/PVE/LXC/Setup.pm
src/PVE/LXC/Setup/Base.pm