From patchwork Thu Mar 12 19:04:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1253875 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=OupZyr43; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48ddZG5dvHz9sPF for ; Fri, 13 Mar 2020 06:05:26 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E8F53883BC; Thu, 12 Mar 2020 19:05:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a9X5JGPGCDB1; Thu, 12 Mar 2020 19:05:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E416488388; Thu, 12 Mar 2020 19:05:19 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 7730D1BF40A for ; Thu, 12 Mar 2020 19:05:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7456886C82 for ; Thu, 12 Mar 2020 19:05:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Sxl6cnIQWhkM for ; Thu, 12 Mar 2020 19:05:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 4B8BC86CB5 for ; Thu, 12 Mar 2020 19:05:15 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id 11so7313027wmo.2 for ; Thu, 12 Mar 2020 12:05:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8w7IfHYbCDBVYmLfFZBs2A1+1nDgfwvXo0JTFYEh438=; b=OupZyr43fmyJSZLM+2RtUWjtLBFxL9LfaQnTA9NGqFgTsSbXVx5sCyFX61iFziHtVw ulwsf4jl1IYHhIL2FtEN4qsZNh+sjL/f+C+BEmKWzSyMslRvvmU8rjMA6NO+wGfuhfkQ jTtgihndEL+yuXb4Ry3iqXdkN4ZY5GnPK0PGEU+O701+hvKv610sb4T6R/w0SmxPaHD+ SOaYB2Nn6STIY+fw/c7DxpmUY+24pcyPgM19a79cFr4Silg/+nIZygkiwuw1NFRniUMT i2ItgQjZqBOsE6e2zTseBmQcin/M9lxRAtHYPu31QyrLHJAVqk1i8NddFamWSd+G0Gwq aFew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8w7IfHYbCDBVYmLfFZBs2A1+1nDgfwvXo0JTFYEh438=; b=npF+HdsKMMr+HixMvqvejY2d6o0N7aa1gBEbghpZRm3DM6slUv7s2UMVdg86X5/k+Y 1i5Us/V4RNO5ixU5+A8UAQ7oO1R7bUlq773NQTSxUN74NC0aC31xx6RbOgp0VQQfrXgS U4McXYs1o9AU1Lq12f4kgiwBn0DLPq+jpsDRvypsVPqDbw0766XSz3yrVvQLvBL35ZlC 7uVFHc7OSzvBen5xtIOZj1QvRiVOgAbePOjV+/AexdvV8EUweMn4dcUaw0zWoqrJvQBH hGSVhQ+bGTksWr2dZtqI7379cBbkAOetb8H+FqhOF6fLPWyhr2Xh1TeaiB6y3V1RmoqB eUNQ== X-Gm-Message-State: ANhLgQ3cGq1Cn7t4HlWtg6wMKjDQ6zJyyWJiRqrEbljxtDgbVftJ/SWX xZ4l2PXPCabigaJOJI5CghnIwTc2SCU= X-Google-Smtp-Source: ADFU+vsBrwK9z7fYJIppGHscAYUnDy3T1GgNntulsY2GXa4GHd6ABGPGpe0EHRtW6J24YeleTQsZzw== X-Received: by 2002:a1c:5585:: with SMTP id j127mr6195521wmb.35.1584039913383; Thu, 12 Mar 2020 12:05:13 -0700 (PDT) Received: from hthiery01.sab.local ([213.135.10.150]) by smtp.gmail.com with ESMTPSA id b203sm14261755wmc.45.2020.03.12.12.05.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 12:05:12 -0700 (PDT) From: Heiko Thiery To: buildroot@buildroot.org Date: Thu, 12 Mar 2020 20:04:34 +0100 Message-Id: <20200312190434.973-2-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200312190434.973-1-heiko.thiery@gmail.com> References: <20200312190434.973-1-heiko.thiery@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 1/2] package/linuxptp: make initscript options configurable X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlos Santos , Michale Walle , Heiko Thiery , Petr Kulhavy Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The "package/busybox/S01sysklogd" is taken as template to change the init script of the linuxptp daemon. The init script is split two parts because there are 2 daemons (ptp4l and phc2sys). Let the user supply its own options in /etc/default/ptp4l and /etc/default/phc2sys. This patch also fixes an issue with the creation of the pid file that is needed to properly stop the daemon again. Signed-off-by: Michael Walle Signed-off-by: Heiko Thiery Tested-by: Carlos Santos --- package/linuxptp/S65linuxptp | 46 ---------------------------- package/linuxptp/S65ptp4l | 59 ++++++++++++++++++++++++++++++++++++ package/linuxptp/S66phc2sys | 59 ++++++++++++++++++++++++++++++++++++ package/linuxptp/linuxptp.mk | 6 ++-- 4 files changed, 122 insertions(+), 48 deletions(-) delete mode 100644 package/linuxptp/S65linuxptp create mode 100644 package/linuxptp/S65ptp4l create mode 100644 package/linuxptp/S66phc2sys diff --git a/package/linuxptp/S65linuxptp b/package/linuxptp/S65linuxptp deleted file mode 100644 index 46b8921fdd..0000000000 --- a/package/linuxptp/S65linuxptp +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# -# Start linuxptp -# - -start() { - printf "Starting linuxptp daemon: " - start-stop-daemon -S -b -q -p /var/run/linuxptp-ptp4l.pid \ - -x /usr/sbin/ptp4l -- -f /etc/linuxptp.cfg - [ $? = 0 ] && echo "OK" || echo "FAIL" - - printf "Starting linuxptp system clock synchronization: " - start-stop-daemon -S -b -q -p /var/run/linuxptp-phc2sys.pid \ - -x /usr/sbin/phc2sys -- -s eth0 -c CLOCK_REALTIME -w -S 1.0 - [ $? = 0 ] && echo "OK" || echo "FAIL" -} - -stop() { - printf "Stopping linuxptp system clock synchronization: " - start-stop-daemon -K -q -p /var/run/linuxptp-phc2sys.pid \ - -x /usr/sbin/phc2sys - echo "OK" - - printf "Stopping linuxptp daemon: " - start-stop-daemon -K -q -p /var/run/linuxptp-ptp4l.pid \ - -x /usr/sbin/ptp4l - echo "OK" -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart|reload) - stop - start - ;; - *) - echo "Usage: $0 {start|stop|restart}" - exit 1 -esac - -exit $? diff --git a/package/linuxptp/S65ptp4l b/package/linuxptp/S65ptp4l new file mode 100644 index 0000000000..630c5e803b --- /dev/null +++ b/package/linuxptp/S65ptp4l @@ -0,0 +1,59 @@ +#!/bin/sh +# +# Start linuxptp +# + +DAEMON="ptp4l" + +PIDFILE="/var/run/$DAEMON.pid" + +PTP4L_ARGS="-f /etc/linuxptp.cfg" + +# shellcheck source=/dev/null +[ -r "/etc/default/ptp4l" ] && . "/etc/default/ptp4l" + +# ptp4l does not create a pidfile, so pass "-n" in the command line +# and use "-m" to instruct start-stop-daemon to create one. +start() { + printf "Starting linuxptp daemon: " + start-stop-daemon -S -b -q -m -p $PIDFILE \ + -x /usr/sbin/$DAEMON -- $PTP4L_ARGS + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return $status +} + +stop() { + printf "Stopping linuxptp daemon: " + start-stop-daemon -K -q -p $PIDFILE + status=$? + if [ "$status" -eq 0 ]; then + rm -f "$PIDFILE" + echo "OK" + else + echo "FAIL" + fi + return $status +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/linuxptp/S66phc2sys b/package/linuxptp/S66phc2sys new file mode 100644 index 0000000000..c680879aeb --- /dev/null +++ b/package/linuxptp/S66phc2sys @@ -0,0 +1,59 @@ +#!/bin/sh +# +# Start linuxptp +# + +DAEMON="phc2sys" + +PIDFILE="/var/run/$DAEMON.pid" + +PHC2SYS_ARGS="-a -r -S 1.0" + +# shellcheck source=/dev/null +[ -r "/etc/default/phc2sys" ] && . "/etc/default/phc2sys" + +# phc2sys does not create a pidfile, so pass "-n" in the command line +# and use "-m" to instruct start-stop-daemon to create one. +start() { + printf "Starting linuxptp system clock synchronization: " + start-stop-daemon -S -b -q -m -p $PIDFILE \ + -x /usr/sbin/$DAEMON -- $PHC2SYS_ARGS + status=$? + if [ "$status" -eq 0 ]; then + echo "OK" + else + echo "FAIL" + fi + return $status +} + +stop() { + printf "Stopping linuxptp system clock synchronization: " + start-stop-daemon -K -q -p $PIDFILE + status=$? + if [ "$status" -eq 0 ]; then + rm -f "$PIDFILE" + echo "OK" + else + echo "FAIL" + fi + return $status +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/linuxptp/linuxptp.mk b/package/linuxptp/linuxptp.mk index 97e4af7be7..ba57396f86 100644 --- a/package/linuxptp/linuxptp.mk +++ b/package/linuxptp/linuxptp.mk @@ -33,8 +33,10 @@ define LINUXPTP_INSTALL_TARGET_CMDS endef define LINUXPTP_INSTALL_INIT_SYSV - $(INSTALL) -m 755 -D $(LINUXPTP_PKGDIR)/S65linuxptp \ - $(TARGET_DIR)/etc/init.d/S65linuxptp + $(INSTALL) -m 755 -D $(LINUXPTP_PKGDIR)/S65ptp4l \ + $(TARGET_DIR)/etc/init.d/S65ptp4l + $(INSTALL) -m 755 -D $(LINUXPTP_PKGDIR)/S66phc2sys \ + $(TARGET_DIR)/etc/init.d/S66phc2sys endef define LINUXPTP_INSTALL_INIT_SYSTEMD From patchwork Thu Mar 12 19:04:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1253876 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=mGd7SUKy; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48ddZJ03Nxz9sPF for ; Fri, 13 Mar 2020 06:05:27 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 076458746D; Thu, 12 Mar 2020 19:05:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GcGxpI6gDwlw; Thu, 12 Mar 2020 19:05:24 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 545ED87482; Thu, 12 Mar 2020 19:05:24 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 13E041BF40A for ; Thu, 12 Mar 2020 19:05:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 061498838E for ; Thu, 12 Mar 2020 19:05:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GcLOEXHw9vzg for ; Thu, 12 Mar 2020 19:05:22 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id 16220883CA for ; Thu, 12 Mar 2020 19:05:22 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id r7so6180877wmg.0 for ; Thu, 12 Mar 2020 12:05:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=InGbvNM2R+8HLmTIaLQvk2VzfaqpkNp0leLh/fXL/gg=; b=mGd7SUKy/vzJ7Eg5eg5owDlL+AiCqGjgdP09zl9fs/fiKOmqYb+zBthIo3yfllr50K qLMv9IWpWQyyYco3sKp6NTlpaUVNf3CkIGz0OxrVC4kQY11m5Wnq+gmjdWlAlRj0c4MQ QQf2/V1weZ0cDWG6/6Juk5pG0VlEWbwSh2ANB5ZAZXJHVv8P4iw7SOQUKptPOSLQ1S+t KRUQHq0OogAWqjxm86PmF3yny9DnoOmzWa3GZcoKWvzTf0Y9zTDhzsurRdgITBJcyaja Ngi04boBWHipzaRdZcjEvOOTKDVO1FMyB6zGjgtLCoAi9zqwyXdoeoyshLDnKxXhiKb9 +Ffw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=InGbvNM2R+8HLmTIaLQvk2VzfaqpkNp0leLh/fXL/gg=; b=si2NarnCOwIRBZcMyL5oLZWKtl0Ugvs98gHo9eJtH9V+7haj6DOMrK+MV9JkwY36gD a1caRyYUn+qv9CDzAzX4gyYEgyQz80zTgzDSsmnEAZnBzoVnJMP1WXR3sfBe5eD8CEkT /k7K/IJvBLL40AZh4LCam19deJcyzIuHRCZpy7XxELqdoyxCNvLA+Uinrd5050aRRkC/ BoCdOUH/MnJYlSiY8ERr1AwBXV0w0N5EHemboDJtt+eqNKvvkAw0aFFVSahLiejraC/N Y02INTvy8pY8VWonvlG0B10wvo3ICsfu9jxekE1ZKUSHFXloQaXZPDEnh9jMUswEJIcW OzqQ== X-Gm-Message-State: ANhLgQ0o1lzmjipKdCgflpjyaCPTreZiB5YpImEiD7uiXJF9u9/XHIB8 TCvzT6FcvI/fSl+yhtzndDT6CC5teyI= X-Google-Smtp-Source: ADFU+vsfQWWaK2hnLIf2uKmenpNyMxnQZ/vkDh2nOn4D97o3ccRQPZr37SecnnSpPtq0KfUkP+xKag== X-Received: by 2002:a7b:c2a2:: with SMTP id c2mr6086096wmk.19.1584039919359; Thu, 12 Mar 2020 12:05:19 -0700 (PDT) Received: from hthiery01.sab.local ([213.135.10.150]) by smtp.gmail.com with ESMTPSA id b203sm14261755wmc.45.2020.03.12.12.05.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Mar 2020 12:05:18 -0700 (PDT) From: Heiko Thiery To: buildroot@buildroot.org Date: Thu, 12 Mar 2020 20:04:36 +0100 Message-Id: <20200312190434.973-3-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200312190434.973-1-heiko.thiery@gmail.com> References: <20200312190434.973-1-heiko.thiery@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v4 2/2] package/linuxptp: rename systemd service scripts X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Carlos Santos , Michale Walle , Heiko Thiery , Petr Kulhavy Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Use the same name as for the SysVinit scripts. This name is also used in debian. linuxptp-system-clock.service -> phc2sys.service linuxptp.service -> ptp4l.service Signed-off-by: Heiko Thiery Tested-by: Carlos Santos Tested-by: Carlos Santos --- package/linuxptp/linuxptp.mk | 8 ++++---- .../{linuxptp-system-clock.service => phc2sys.service} | 2 +- package/linuxptp/{linuxptp.service => ptp4l.service} | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename package/linuxptp/{linuxptp-system-clock.service => phc2sys.service} (89%) rename package/linuxptp/{linuxptp.service => ptp4l.service} (87%) diff --git a/package/linuxptp/linuxptp.mk b/package/linuxptp/linuxptp.mk index ba57396f86..921c55ad59 100644 --- a/package/linuxptp/linuxptp.mk +++ b/package/linuxptp/linuxptp.mk @@ -40,10 +40,10 @@ define LINUXPTP_INSTALL_INIT_SYSV endef define LINUXPTP_INSTALL_INIT_SYSTEMD - $(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/linuxptp.service \ - $(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 + $(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/ptp4l.service \ + $(TARGET_DIR)/usr/lib/systemd/system/ptp4l.service + $(INSTALL) -D -m 644 $(LINUXPTP_PKGDIR)/phc2sys.service \ + $(TARGET_DIR)/usr/lib/systemd/system/phc2sys.service endef $(eval $(generic-package)) diff --git a/package/linuxptp/linuxptp-system-clock.service b/package/linuxptp/phc2sys.service similarity index 89% rename from package/linuxptp/linuxptp-system-clock.service rename to package/linuxptp/phc2sys.service index 57beec4579..63b0ca23c3 100644 --- a/package/linuxptp/linuxptp-system-clock.service +++ b/package/linuxptp/phc2sys.service @@ -1,6 +1,6 @@ [Unit] Description=Precision Time Protocol system clock synchronization -After=linuxptp.service +After=ptp4l.service [Service] ExecStart=/usr/sbin/phc2sys -s /dev/ptp0 -c CLOCK_REALTIME -w -S 1.0 diff --git a/package/linuxptp/linuxptp.service b/package/linuxptp/ptp4l.service similarity index 87% rename from package/linuxptp/linuxptp.service rename to package/linuxptp/ptp4l.service index 14e9814b06..07f0b68fad 100644 --- a/package/linuxptp/linuxptp.service +++ b/package/linuxptp/ptp4l.service @@ -3,7 +3,7 @@ Description=Precision Time Protocol daemon After=syslog.target network.target Before=time-sync.target Wants=time-sync.target -Wants=linuxptp-system-clock.service +Wants=phc2sys.service [Service] ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp.cfg