From 0f04baeb9774f794040af6796222e8dd090cec8b Mon Sep 17 00:00:00 2001 From: Robert Fairley Date: Thu, 4 Jun 2020 14:48:40 -0400 Subject: [PATCH] examples: align onoffline with DHCP NM dispatcher Similar to the DHCP dispatcher, add a variable for the chronyc executable path, which can be overwritten more easily by downstream packages if needed. Also give an `.onoffline` suffix to more clearly differentiate this script from `chrony.nm-dispatcher.dhcp`. --- .../{chrony.nm-dispatcher => chrony.nm-dispatcher.onoffline} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename examples/{chrony.nm-dispatcher => chrony.nm-dispatcher.onoffline} (86%) diff --git a/examples/chrony.nm-dispatcher b/examples/chrony.nm-dispatcher.onoffline similarity index 86% rename from examples/chrony.nm-dispatcher rename to examples/chrony.nm-dispatcher.onoffline index 0b0c3e7..34cfa0d 100644 --- a/examples/chrony.nm-dispatcher +++ b/examples/chrony.nm-dispatcher.onoffline @@ -5,11 +5,13 @@ export LC_ALL=C +chronyc=/usr/bin/chronyc + # 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 +$chronyc onoffline > /dev/null 2>&1 exit 0