Install examples/chronyd.service from package as starting point, it works great, otherwise use install_alternative.
Signed-off-by: Bruno Thomsen <[email protected]> --- Changes since version 2: - Remove chronyd.service from projectroot - Install chronyd.service in install stage. Changes since version 1: - Fix install_alternative statement for service file. - Added chrony-3.5/examples/chronyd.service to projectroot. rules/chrony.in | 7 +++++++ rules/chrony.make | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/rules/chrony.in b/rules/chrony.in index c81eba868..16b730199 100644 --- a/rules/chrony.in +++ b/rules/chrony.in @@ -95,6 +95,13 @@ endif config CHRONY_STARTSCRIPT bool default y + depends on INITMETHOD_BBINIT prompt "install /etc/init.d/chrony" +config CHRONY_SYSTEMD_UNIT + bool + default y + depends on INITMETHOD_SYSTEMD + prompt "install systemd unit files" + endif diff --git a/rules/chrony.make b/rules/chrony.make index 9f20c413d..afdfe434a 100644 --- a/rules/chrony.make +++ b/rules/chrony.make @@ -55,6 +55,17 @@ CHRONY_CONF_OPT := \ $(call ptx/ifdef, PTXCONF_GLOBAL_IPV6,,--disable-ipv6) \ --without-seccomp +# ---------------------------------------------------------------------------- +# Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/chrony.install: + @$(call targetinfo) + @$(call world/install, CHRONY) + @install -D -m 644 $(CHRONY_DIR)/examples/chronyd.service \ + $(CHRONY_PKGDIR)/usr/lib/systemd/system/chronyd.service + @$(call touch) + # ---------------------------------------------------------------------------- # Target-Install # ---------------------------------------------------------------------------- @@ -111,6 +122,13 @@ ifneq ($(call remove_quotes, $(PTXCONF_CHRONY_BBINIT_LINK)),) endif endif endif + +ifdef PTXCONF_CHRONY_SYSTEMD_UNIT + @$(call install_alternative, chrony, 0, 0, 0644, /usr/lib/systemd/system/chronyd.service) + @$(call install_link, chrony, ../chronyd.service, \ + /usr/lib/systemd/system/multi-user.target.wants/chronyd.service) +endif + @$(call install_finish, chrony) @$(call touch) -- 2.26.2 _______________________________________________ ptxdist mailing list [email protected] To unsubscribe, send a mail with subject "unsubscribe" to [email protected]
