Re: [chrony-dev] [PATCH] nm-dispatcher: handle NTP servers from DHCP |
[ Thread Index |
Date Index
| More chrony.tuxfamily.org/chrony-dev Archives
]
- To: chrony-dev@xxxxxxxxxxxxxxxxxxxx
- Subject: Re: [chrony-dev] [PATCH] nm-dispatcher: handle NTP servers from DHCP
- From: Robert Fairley <rfairley@xxxxxxxxxx>
- Date: Thu, 21 May 2020 13:48:31 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590083329; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2fUMrXWGGGRca1mwYW4XFoP/El/x+GC8SAAVZcQnKsE=; b=QVnVA/1biyqH9v5BC5ZEOI7cwFtG/Cvh71td/7AbLvaXSsIyP4KYFopkaor3iee3AScut9 aQQi7oZbUnWt/VTi3H1qcrne7S3TNcjF41sMwfHurLmcbvKff1TCmuShLkEgEvzZbzJt/n lLea7Ihq+6RXXsTkzTC2Cz1ZrYqdPVQ=
On Thu, May 21, 2020 at 10:39 AM Miroslav Lichvar <mlichvar@xxxxxxxxxx> wrote:
>
> With this change the example NM dispatcher script would depend on the
> chrony-helper script, which is not included in the upstream
> repository. The patch should be downstream, or the helper script needs
> to be modified to work on all (systemd-based?) distributions and
> included here first. Things like /etc/sysconfig/ and the PEERNTP
> variable are specific to Fedora/RHEL.
Right, I see. Diffing the Fedora RPM with the Debian chrony-helper [1]
as an example, the differences are not too major (directory paths, not
sourcing /etc/sysconfig, and no use of $PEERNTP as you mentioned).
OpenSUSE [2] doesn't appear to have many differences aside from not
using /etc/sysconfig.
Would it be reasonable to check `os-release`, and source /etc/sysconfig
if `ID`/`ID_LIKE` has `fedora` or `rhel`? Directories set by
$chrony_conf, $chrony_service, and $helper_dir could be set in an
environment file maintained downstream (with defaults to certain
locations). Other than that, places where $PEERNTP and $NTPSERVERARGS
are used which normally come from sysconfig could be left as-is, and
have distributions set them to an empty value in the downstream
environment file, or make their use conditional on the `os-release`check
above.
With the changes above I think we'd have a sufficiently configurable
chrony-helper script that'd generally work across distributions. May not
be able to account for certain cases (e.g. distros outside of
Fedora/RHEL/CentOS that might be using /etc/sysconfig?). If the changes
sound reasonable, I'd be happy to work on the edits to chrony-helper and
adding it to this patchset, as part of upstreaming this functionality.
[1] https://salsa.debian.org/debian/chrony/-/blob/master/debian/chrony-helper
[2] https://build.opensuse.org/package/view_file/openSUSE:Factory/chrony/chrony.helper
--
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble? Email listmaster@xxxxxxxxxxxxxxxxxxxx.