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: Miroslav Lichvar <mlichvar@xxxxxxxxxx>
- Date: Mon, 25 May 2020 13:27:19 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1590406045; 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=dk/o6DBiAd8JAv1VpXAVDa7hJSxx6pA7aHsjGtnvoNQ=; b=LnN+aK38ZnWjhlSxppNeObaJ9cQFltmf1fzuc4qgbQZDc/WPsIhqZfFttflZmbZWn2R649 91pZeEcoO8zcg9/WfQoEJxrH3HuOfQ2fYy7RdiNv1Y1adbyRLE3B2sZSNPUDIj/pdg+rJP MFyikOkPMacumyE8U3lhxMtvmp1BeBU=
On Thu, May 21, 2020 at 01:48:31PM -0400, Robert Fairley wrote:
> 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.
I'd rather avoid having any distribution-specific code in the
examples. If there was a downstream change in one of the directories
for instance, we would need to support different versions of the
distribution.
If you would like to submit the chrony-helper script, please remove
the sysconfig/PEERNTP stuff. It can be put back in a downstream patch.
The various locations in the script can be set to strings like
@CHRONYC@, @CHRONYCONF@, @DHCP_SERVERS_FILES@ to indicate they need to
be edited before use.
Also, please rename the dhclient_servers_files variable to
dhcp_servers_file and remove the add/remove-dhclient-servers commands.
The NM dispatcher script should follow the same idea, e.g. the check
of /sbin/dhclient should be in a downstream patch.
--
Miroslav Lichvar
--
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.