coreos-base/oem-azure: Add dropin to add chrony dependency on /dev/ptp_hyperv

Inspired by https://github.com/microsoft/azurelinux/pull/6234, requires
a udev rule to be shipped with the OS, since udev rules in sysexts don't
quite work.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
This commit is contained in:
Jeremi Piotrowski 2024-03-25 16:56:12 +00:00
parent 9d065d1cf5
commit f1188f4be6
2 changed files with 6 additions and 0 deletions

View File

@ -0,0 +1,4 @@
# This should only be used when chronyd is configured to use the /dev/ptp_hyperv device
[Unit]
Wants=dev-ptp_hyperv.device
After=dev-ptp_hyperv.device

View File

@ -26,6 +26,8 @@ S="${WORKDIR}"
src_install() {
systemd_enable_service multi-user.target chronyd.service
insinto "$(systemd_get_systemunitdir)"/chronyd.service.d
doins "${FILESDIR}"/chrony-hyperv.conf
dotmpfiles "${FILESDIR}"/var-chrony.conf
dotmpfiles "${FILESDIR}"/etc-chrony.conf
insinto /usr/share/${PN}