From e23d3c57a02b6b6d1062a878b792dfcce2c7004d Mon Sep 17 00:00:00 2001 From: nl6720 Date: Mon, 29 Aug 2022 16:01:46 +0300 Subject: Enable systemd-time-wait-sync.service and order pacman-init.service after time-sync.target If the hardware clock is not in UTC, but instead UTC+X, the pacman keyring may end up with keys created in the future. Ensure the time is synced before starting pacman-init.service. This fixes the equivalent of archiso's https://gitlab.archlinux.org/archlinux/archiso/-/issues/190 for arch-boxes. --- images/base.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images/base.sh b/images/base.sh index 68fbb8b..63b8162 100644 --- a/images/base.sh +++ b/images/base.sh @@ -23,6 +23,7 @@ function pre() { [Unit] Description=Initializes Pacman keyring Before=sshd.service cloud-final.service archlinux-keyring-wkd-sync.service +After=time-sync.target ConditionFirstBoot=yes [Service] @@ -60,6 +61,7 @@ systemctl enable sshd systemctl enable systemd-networkd systemctl enable systemd-resolved systemctl enable systemd-timesyncd +systemctl enable systemd-time-wait-sync systemctl enable pacman-init.service systemctl enable reflector-init.service EOF -- cgit v1.2.3-70-g09d2