From a8dadce65b6b09aacf83916b998651a5c5c90a4d Mon Sep 17 00:00:00 2001 From: Christer Ekholm Date: Mon, 13 Jul 2020 14:49:36 +0200 Subject: [PATCH] Fix condition for inserting blank line before refclocks The test `if $chrony::refclocks` was wrong, resulting in a blank line when $refclocks is an empty array. This tests instead for emptiness. --- templates/chrony.conf.epp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/chrony.conf.epp b/templates/chrony.conf.epp index b9da663..1970f6d 100644 --- a/templates/chrony.conf.epp +++ b/templates/chrony.conf.epp @@ -92,7 +92,7 @@ logdir /var/log/chrony <% if $chrony::log_options { -%> log <%= $chrony::log_options %> <% } -%> -<% if $chrony::refclocks { -%> +<% unless $chrony::refclocks.empty { -%> <% $chrony::refclocks.each |$driver| { -%> refclock <%= $driver.flatten.join(' ') %>