From 174b082903066e9f9b9015f529801d2740fce84f 2019-01-24 10:13:09 From: Daniel Kraemer Date: 2019-01-24 10:13:09 Subject: [PATCH] Fixed timezone setting --- diff --git a/bootstrap.d/12-locale.sh b/bootstrap.d/12-locale.sh index 9817d7a..79496f5 100644 --- a/bootstrap.d/12-locale.sh +++ b/bootstrap.d/12-locale.sh @@ -7,6 +7,14 @@ # Install and setup timezone echo "${TIMEZONE}" > "${ETC_DIR}/timezone" +if [ -f "${ETC_DIR}/localtime" ]; then + # 1. If 11-apt.sh upgrades the package 'tzdata', '/etc/localtime' was created + # because 'dpkg-reconfigure -f noninteractive tzdata' was executed by apt-get. + # 2. If '/etc/localtime' exists, our execution of 'dpkg-reconfigure -f noninteractive tzdata' + # will ignore the our timezone set in '/etc/timezone'. + # 3. Removing /etc/localtime will solve this. + rm -f "${ETC_DIR}/localtime" +fi chroot_exec dpkg-reconfigure -f noninteractive tzdata # Install and setup default locale and keyboard configuration