All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jérémy Rosen" <jeremy.rosen@smile.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 09/15] package/linuxptp adapt to preset-all
Date: Sun,  3 Nov 2019 17:56:34 +0100	[thread overview]
Message-ID: <20191103165640.21819-10-jeremy.rosen@smile.fr> (raw)
In-Reply-To: <20191103165640.21819-1-jeremy.rosen@smile.fr>

linuxptp has two services
* linuxptp.service : the actual daemon
* linuxptp-system-clock.service : sync the linux clock to the phc clock

The first was enabled, the second was not
The second has an incorrect (though harmless) WantedBy : there is an
explicit Wants= in linuxptp.service

This keeps the compatibility, but I don't see the poit of not enabling the
second service.

Signed-off-by: J?r?my Rosen <jeremy.rosen@smile.fr>
---
 package/linuxptp/50-linuxptp.preset            | 1 +
 package/linuxptp/linuxptp-system-clock.service | 1 -
 package/linuxptp/linuxptp.mk                   | 5 ++---
 3 files changed, 3 insertions(+), 4 deletions(-)
 create mode 100644 package/linuxptp/50-linuxptp.preset

diff --git a/package/linuxptp/50-linuxptp.preset b/package/linuxptp/50-linuxptp.preset
new file mode 100644
index 0000000000..dd8dbb12d5
--- /dev/null
+++ b/package/linuxptp/50-linuxptp.preset
@@ -0,0 +1 @@
+disable linuxptp-system-clock.service
diff --git a/package/linuxptp/linuxptp-system-clock.service b/package/linuxptp/linuxptp-system-clock.service
index a4436a34a7..57beec4579 100644
--- a/package/linuxptp/linuxptp-system-clock.service
+++ b/package/linuxptp/linuxptp-system-clock.service
@@ -8,4 +8,3 @@ Restart=always
 
 [Install]
 WantedBy=multi-user.target
-WantedBy=linuxptp.service
diff --git a/package/linuxptp/linuxptp.mk b/package/linuxptp/linuxptp.mk
index c304ff6d6e..5b55322b0b 100644
--- a/package/linuxptp/linuxptp.mk
+++ b/package/linuxptp/linuxptp.mk
@@ -42,9 +42,8 @@ define LINUXPTP_INSTALL_INIT_SYSTEMD
 		$(TARGET_DIR)/usr/lib/systemd/system/linuxptp.service
 	$(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/linuxptp-system-clock.service \
 		$(TARGET_DIR)/usr/lib/systemd/system/linuxptp-system-clock.service
-	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
-	ln -sf ../../../../usr/lib/systemd/system/linuxptp.service \
-		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/linuxptp.service
+	$(INSTALL) -D -m 644 package/linuxptp/50-linuxptp.preset \
+		$(TARGET_DIR)/usr/lib/systemd/system-preset/50-linuxptp.preset
 endef
 
 $(eval $(generic-package))
-- 
2.24.0.rc1

  parent reply	other threads:[~2019-11-03 16:56 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-03 16:56 [Buildroot] [PATCH 00/15] use host-systemd to enable units Jérémy Rosen
2019-11-03 16:56 ` [Buildroot] [PATCH 01/15] new recipe : host-systemd Jérémy Rosen
2019-11-03 17:20   ` James Hilliard
2019-11-04 17:02     ` Jérémy ROSEN
     [not found]       ` <CAJ4jsafSoX5ayztTZgOS38YPtVZbT7gYkk3FKHQ0U1FDG8u+bA@mail.gmail.com>
     [not found]         ` <CAFvCimWyMdTTZDxv3EyKDaHGXhrzOd2brLSe+BgbuU9oxJ3S8A@mail.gmail.com>
2019-11-04 20:40           ` Carlos Santos
2019-11-09 21:52     ` Yann E. MORIN
2019-11-09 21:49   ` Yann E. MORIN
2019-11-10 10:43     ` Jérémy ROSEN
2019-11-03 16:56 ` [Buildroot] [PATCH 02/15] use host-systemctl preset all to enable units Jérémy Rosen
2019-11-03 16:56 ` [Buildroot] [PATCH 03/15] fix tty handling Jérémy Rosen
2019-11-03 17:48   ` James Hilliard
2019-11-04 17:08     ` Jérémy ROSEN
2019-11-03 16:56 ` [Buildroot] [PATCH 04/15] fix trivial packages with buildroot-provided services Jérémy Rosen
2019-11-03 16:56 ` [Buildroot] [PATCH 05/15] fix trivial cases, upstream-provided services Jérémy Rosen
2019-11-03 16:56 ` [Buildroot] [PATCH 06/15] package/avahi: adapt to preset-all Jérémy Rosen
2019-11-03 17:15   ` James Hilliard
2019-11-03 17:17     ` Jérémy ROSEN
2019-11-09 22:08       ` Yann E. MORIN
2019-11-03 16:56 ` [Buildroot] [PATCH 07/15] package/connman: " Jérémy Rosen
2019-11-03 17:39   ` James Hilliard
2019-11-09 22:11   ` Yann E. MORIN
2019-11-09 22:36     ` James Hilliard
2019-11-10 10:19       ` Jérémy ROSEN
2019-11-03 16:56 ` [Buildroot] [PATCH 08/15] package/dante: " Jérémy Rosen
2019-11-03 17:17   ` James Hilliard
2019-11-03 16:56 ` Jérémy Rosen [this message]
2019-11-03 17:23   ` [Buildroot] [PATCH 09/15] package/linuxptp " James Hilliard
2019-11-03 16:56 ` [Buildroot] [PATCH 10/15] package/docker-engine: " Jérémy Rosen
2019-11-03 17:25   ` James Hilliard
2019-11-04 17:03     ` Jérémy ROSEN
2019-11-03 16:56 ` [Buildroot] [PATCH 11/15] package/network-manager: " Jérémy Rosen
2019-11-03 17:30   ` James Hilliard
2019-11-09 22:14   ` Yann E. MORIN
2019-11-09 22:25     ` James Hilliard
2019-11-03 16:56 ` [Buildroot] [PATCH 12/15] package/wpa_supplicant: adapt for preset-all Jérémy Rosen
2019-11-03 17:32   ` James Hilliard
2019-11-03 16:56 ` [Buildroot] [PATCH 13/15] package/sysklogd: adapt to preset-all Jérémy Rosen
2019-11-03 17:33   ` James Hilliard
2019-11-03 16:56 ` [Buildroot] [PATCH 14/15] package/targetcli-fb: " Jérémy Rosen
2019-11-03 17:34   ` James Hilliard
2019-11-03 16:56 ` [Buildroot] [PATCH 15/15] package/tor: " Jérémy Rosen
2019-11-03 17:31   ` James Hilliard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191103165640.21819-10-jeremy.rosen@smile.fr \
    --to=jeremy.rosen@smile.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.