From 104f986b0650b8f93540785d2bcf486905e49b62 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 5 May 2024 20:43:21 +0200 Subject: Adding upstream version 3.4. Signed-off-by: Daniel Baumann --- examples/chrony.nm-dispatcher | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/chrony.nm-dispatcher (limited to 'examples/chrony.nm-dispatcher') diff --git a/examples/chrony.nm-dispatcher b/examples/chrony.nm-dispatcher new file mode 100644 index 0000000..0b0c3e7 --- /dev/null +++ b/examples/chrony.nm-dispatcher @@ -0,0 +1,15 @@ +#!/bin/sh +# This is a NetworkManager dispatcher / networkd-dispatcher script for +# chronyd to set its NTP sources online or offline when a network interface +# is configured or removed + +export LC_ALL=C + +# For NetworkManager consider only up/down events +[ $# -ge 2 ] && [ "$2" != "up" ] && [ "$2" != "down" ] && exit 0 + +# Note: for networkd-dispatcher routable.d ~= on and off.d ~= off + +chronyc onoffline > /dev/null 2>&1 + +exit 0 -- cgit v1.2.3