From 7a3d1148d4b7bd614b1994635b63d15e40ebc154 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Thu, 25 Feb 2021 14:14:13 +0100 Subject: [PATCH] minimize default configuration Instead of listing all options with their defaults in the default ptp4l.conf, provide a minimal ptp4l.conf intended for a client-only operation and refer to the ptp4l man page and examples in /usr/share/doc/linuxptp/configs. Also, remove ntpd-specific configuration from default timemaster.conf. The original ntpd supported by timemaster is no longer packaged in Fedora. --- linuxptp.spec | 6 +++--- ptp4l.conf | 14 ++++++++++++++ timemaster.conf | 7 ------- 3 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 ptp4l.conf diff --git a/linuxptp.spec b/linuxptp.spec index 21f3e46..8cb75fc 100644 --- a/linuxptp.spec +++ b/linuxptp.spec @@ -15,6 +15,7 @@ Source1: phc2sys.service Source2: ptp4l.service Source3: timemaster.service Source4: timemaster.conf +Source5: ptp4l.conf # external test suite Source10: https://github.com/mlichvar/linuxptp-testsuite/archive/%{testsuite_ver}/linuxptp-testsuite-%{testsuite_ver}.tar.gz # simulator for test suite @@ -49,11 +50,10 @@ mv clknetsim-%{clknetsim_ver}* testsuite/clknetsim %makeinstall mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir}/sysconfig,%{_unitdir},%{_mandir}/man5} -install -m 644 -p configs/default.cfg $RPM_BUILD_ROOT%{_sysconfdir}/ptp4l.conf install -m 644 -p %{SOURCE1} %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir} -install -m 644 -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir} +install -m 644 -p %{SOURCE4} %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir} -echo 'OPTIONS="-f /etc/ptp4l.conf -i eth0"' > \ +echo 'OPTIONS="-f /etc/ptp4l.conf"' > \ $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ptp4l echo 'OPTIONS="-a -r"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys diff --git a/ptp4l.conf b/ptp4l.conf new file mode 100644 index 0000000..4b4b1db --- /dev/null +++ b/ptp4l.conf @@ -0,0 +1,14 @@ +# For more information about this file, see the ptp4l(8) man page. +# Examples are available in /usr/share/doc/linuxptp/configs. + +[global] +domainNumber 0 +slaveOnly 1 +time_stamping hardware +tx_timestamp_timeout 1 +logging_level 6 +summary_interval 0 + +[eth0] +network_transport UDPv4 +hybrid_e2e 0 diff --git a/timemaster.conf b/timemaster.conf index fd8e77e..1476209 100644 --- a/timemaster.conf +++ b/timemaster.conf @@ -14,18 +14,11 @@ ntp_program chronyd [chrony.conf] include /etc/chrony.conf -[ntp.conf] -includefile /etc/ntp.conf - [ptp4l.conf] [chronyd] path /usr/sbin/chronyd -[ntpd] -path /usr/sbin/ntpd -options -u ntp:ntp -g - [phc2sys] path /usr/sbin/phc2sys