1#!/usr/bin/env bash 2# SPDX-License-Identifier: LGPL-2.1-or-later 3set -eux 4set -o pipefail 5 6systemd-analyze log-level debug 7systemd-analyze log-target console 8 9systemctl disable --now systemd-timesyncd.service 10 11timedatectl set-timezone Europe/Berlin 12timedatectl set-time 1980-10-15 13 14systemd-run --on-timezone-change touch /tmp/timezone-changed 15systemd-run --on-clock-change touch /tmp/clock-changed 16 17test ! -f /tmp/timezone-changed 18test ! -f /tmp/clock-changed 19 20timedatectl set-timezone Europe/Kiev 21 22while test ! -f /tmp/timezone-changed ; do sleep .5 ; done 23 24timedatectl set-time 2018-1-1 25 26while test ! -f /tmp/clock-changed ; do sleep .5 ; done 27 28systemd-analyze log-level info 29 30echo OK >/testok 31 32exit 0 33