From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: In-Reply-To: <20200731161141.6155-3-bruno.thomsen@gmail.com> MIME-Version: 1.0 Message-Id: From: Michael Olbrich Date: Mon, 03 Aug 2020 08:30:18 +0200 Subject: Re: [ptxdist] [APPLIED] chrony: systemd unit option List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Bruno Thomsen Thanks, applied as 40fc445e7e967afec547138aed990904fbd793ef. Michael [sent from post-receive hook] On Mon, 03 Aug 2020 08:30:18 +0200, Bruno Thomsen wrote: > Install examples/chronyd.service from package as starting > point, it works great, otherwise use install_alternative. > > Signed-off-by: Bruno Thomsen > Message-Id: <20200731161141.6155-3-bruno.thomsen@gmail.com> > Signed-off-by: Michael Olbrich > > diff --git a/rules/chrony.in b/rules/chrony.in > index e150448a84e9..44c12b423f06 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 9f20c413dff4..afdfe434ad0a 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) _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de