Bug#855834: linuxptp: default startup argument "-i eth0" should be removed

Felipe Sateler fsateler at debian.org
Wed Feb 22 12:51:25 UTC 2017


Hi

On Wed, Feb 22, 2017 at 7:36 AM, Tino Mettler <tino.mettler at tikei.de> wrote:
> On Wed, Feb 22, 2017 at 10:59:08 +0100, Norbert Lange wrote:
>
> [...]
>
>> I would recommend removing the argument, and add a section for the device in the
>> configuration file. can be a placeholder like [eth0], I would not know
>> of a good default name that would fit most systems.
>
> Hi,
>
> thanks for the comments. If I got this right, there won't be a default
> name that would fit most systems as of Stretch and later.

That is correct.

>
> A userfriedly approach would be to look for a device with PTP support
> and use this, or supply a debconf request with devices that can be
> used. I'll try to incorporate this. My debconf foo is limited. though,
> so this might take a while.

The readme suggests ptp4l can detect appropiate devices by itself. If
that is true, then there is no problem to be solved :).

If that is not true, I suggest the following:

1. Convert ptp4l into a template unit, ptp4l at .service
2. Change the device to be the instance:
ExecStart=ExecStart=/usr/sbin/ptp4l -f /etc/linuxptp/ptp4l.conf -i %i
3. Do not enable the unit.
4. Add a udev rule that starts the (properly instanced) service when
it is detected.

You can see the ifupdown package for a similar approach: there is
ifup at .service, a udev rule, and a helper program (ifupdown-hotplug)
that determines if an instance should be started for the given device.



While I looked at the service files, I noticed you order them after
chrony, ntpdate and other time services. Systemd defines a standard
place for that, so you can replace all those alternatives with
`time-sync.target`.


-- 

Saludos,
Felipe Sateler



More information about the pkg-multimedia-maintainers mailing list