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.
This commit is contained in:
Miroslav Lichvar 2021-02-25 14:14:13 +01:00
parent d8134826fc
commit 7a3d1148d4
3 changed files with 17 additions and 10 deletions

View File

@ -15,6 +15,7 @@ Source1: phc2sys.service
Source2: ptp4l.service Source2: ptp4l.service
Source3: timemaster.service Source3: timemaster.service
Source4: timemaster.conf Source4: timemaster.conf
Source5: ptp4l.conf
# external test suite # external test suite
Source10: https://github.com/mlichvar/linuxptp-testsuite/archive/%{testsuite_ver}/linuxptp-testsuite-%{testsuite_ver}.tar.gz Source10: https://github.com/mlichvar/linuxptp-testsuite/archive/%{testsuite_ver}/linuxptp-testsuite-%{testsuite_ver}.tar.gz
# simulator for test suite # simulator for test suite
@ -49,11 +50,10 @@ mv clknetsim-%{clknetsim_ver}* testsuite/clknetsim
%makeinstall %makeinstall
mkdir -p $RPM_BUILD_ROOT{%{_sysconfdir}/sysconfig,%{_unitdir},%{_mandir}/man5} 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 %{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 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/ptp4l
echo 'OPTIONS="-a -r"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys echo 'OPTIONS="-a -r"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys

14
ptp4l.conf Normal file
View File

@ -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

View File

@ -14,18 +14,11 @@ ntp_program chronyd
[chrony.conf] [chrony.conf]
include /etc/chrony.conf include /etc/chrony.conf
[ntp.conf]
includefile /etc/ntp.conf
[ptp4l.conf] [ptp4l.conf]
[chronyd] [chronyd]
path /usr/sbin/chronyd path /usr/sbin/chronyd
[ntpd]
path /usr/sbin/ntpd
options -u ntp:ntp -g
[phc2sys] [phc2sys]
path /usr/sbin/phc2sys path /usr/sbin/phc2sys