+++ This bug was initially created as a clone of Bug #1374767 +++
Description of problem:
'chrony-helper enable-dnssrv _ntp._udp.DOMAIN' enables instance of a timer 'chrony-dnssrv@DOMAIN.timer'. systemd requires for '-' character to be escaped in unit names. (There are few more escaping rules, but for characters which are not used in domain names).
Therefore lines like this:
have to be written as
local timer=$dnssrv_timer_prefix$(systemd-escape $name).timer
'systemd-escape' is a helper program, part of systemd suite.
Version-Release number of selected component (if applicable):
is there some way to test this except for code review?
I see this is in local variable, so it cannot be queried, the only way would be to check whether systemctl enable/disable actions worked, but how do I know that it worked because of correct escaping or because some error tolerance?
- the original report doesn't mention any real world issue with that, and running the example
# /usr/libexec/chrony-helper enable-dnssrv _ntp._udp.DOMAIN
results in the same both with and without systemd-escape:
Created symlink from /etc/systemd/system/timers.target.wants/chrony-dnssrv@_ntp._udp.DOMAIN.timer to /usr/lib/systemd/system/chrony-dnssrv@.timer.
A domain with "-" should show make difference in the systemd unit name.
# /usr/libexec/chrony-helper enable-dnssrv _ntp._udp.a-b.example.com
Created symlink /etc/systemd/system/timers.target.wants/chrony-dnssrv@_ntp._udp.a\x2db.example.com.timer → /usr/lib/systemd/system/chrony-dnssrv@.timer.
# systemctl list-units | grep chrony-dnssrv
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.