clock: Create compatibility symlinks for UDS.
If using the new default UDS-RW/RO addresses, create symlinks at the
original location for compatibility with non-linuxptp clients and
scripts. This works only when ptp4l is not configured to drop root
privileges, otherwise it will not be able to respond to a socket owned
by root.
Don't call unlink() to remove an existing socket before trying to create
the symlink. It might be a different ptp4l instance still running. Print
a warning message if the path is not already a symlink and the symlink
cannot be created.
Suggested-by: Martin Pecka <peckama2@fel.cvut.cz>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
1 file changed