Re: [chrony-dev] [PATCH] nm-dispatcher: handle NTP servers from DHCP

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


On Tue, May 26, 2020 at 03:26:21PM -0400, Robert Fairley wrote:
> Thank you for the feedback and suggestions on the approach, makes sense
> to keep the files as general examples without the distribution-specific
> handling. I have updated the patch to include chrony.helper.in, following
> these points. One part of the above description which I deviated from
> while making the edits is the following:
> 
> - Use @DHCP_SERVERS_DIR@ instead of @DHCP_SERVERS_FILES@. In the

Makes sense.

> From 9cf2514489352140f70d650cfc6f41f4e4f6a983 Mon Sep 17 00:00:00 2001
> From: Robert Fairley <rfairley@xxxxxxxxxx>
> Date: Sat, 23 May 2020 02:10:38 -0400
> Subject: [PATCH 1/2] examples: upstream chrony.helper script

This patch looks good to me, but please send them as attachments or
separate mails, not mangled by your MUA. git am complained it is
corrupted.

> From fe3db7858a3fd6180c89fd25fd37a5e16805b31a Mon Sep 17 00:00:00 2001
> From: Robert Fairley <rfairley@xxxxxxxxxx>
> Date: Wed, 20 May 2020 14:36:38 -0400
> Subject: [PATCH 2/2] nm-dispatcher: handle NTP servers from DHCP

Please change the subject prefix to "examples:".

> +# Make sure the two action interface and action arguments are passed by
> +# NetworkManager before continuing.
> +[ $# -lt 2 ] && exit 0

I suspect this breaks the networkd-dispatcher support. IIRC there are no
arguments passed to the script.

> +    for server in $DHCP4_NTP_SERVERS; do
> +        echo "$server iburst" >> "$dhcp_server_file"
> +    done
> +    /usr/libexec/chrony-helper update-daemon || :

It would be nice to have the default options and the chrony-helper
path in variables.

Other that I think it's great and I like the descriptive commit
messages.

Thanks,

-- 
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.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/