sys-apps/systemd: Add hook to ensure timesyncd starts after sysexts

Sysexts can includes services that have a Conflicts=systemd-timesyncd
entry. To ensure that this takes effect, start timesyncd after the
ensure-sysext.service.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
Jeremi Piotrowski 2024-03-25 11:35:04 +00:00
parent c5efeec607
commit 3c0283f74a

View File

@ -0,0 +1,13 @@
cros_post_src_install_timesync() {
local dir="${D}$(systemd_get_systemunitdir)/systemd-timesyncd.service.d"
mkdir -p "${dir}"
pushd "${dir}"
cat <<EOF >flatcar.conf || die
# Allow sysexts to ship timesyncd replacements which can have
# a Conflicts=systemd-timesyncd directive that would result
# in systemd-timesyncd not being started.
[Unit]
After=ensure-sysext.service
EOF
popd
}