From 0588cca4cede444bb37ef43c420b2a09494aa339 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Pialasse Date: Fri, 31 Oct 2025 23:31:39 -0400 Subject: [PATCH] * Fri Oct 31 2025 Jean-Philippe Pialasse 11.0.0-9.sme - add missing template changes [SME: 12954] set SyslogIdentifier --- .../templates/etc/ntp.conf/00timeServer | 23 ++++++++++--------- .../ntpd.service.d/50koozali.conf/40service | 1 + smeserver-ntp.spec | 6 ++++- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/root/etc/e-smith/templates/etc/ntp.conf/00timeServer b/root/etc/e-smith/templates/etc/ntp.conf/00timeServer index fc4e3a1..d67563c 100644 --- a/root/etc/e-smith/templates/etc/ntp.conf/00timeServer +++ b/root/etc/e-smith/templates/etc/ntp.conf/00timeServer @@ -1,19 +1,20 @@ { # vim: ft=perl: - my $server = $ntpd{NTPServer} || ''; - return "# sync to hw clock" if $server =~ m#^\s*$#; + my $servers = $ntpd{NTPServer} || ''; + return "# sync to hw clock" if $servers =~ m#^\s*$#; if ( ($ntpd{'SupportLargeDrift'} || 'disabled') eq 'enabled' ){ $OUT .= "tinker panic 0\n"; } - - if ($server =~ /pool.ntp.org/) - { - # The 0, 1, 2, 3 prefixes ensure NTP pool round-robin - $OUT .= "server $_.$server\n" for (0..3); - } - else - { - $OUT .= "server $server\n"; + foreach my $server (split /,/, $servers) { + if ($server =~ /pool.ntp.org/) + { + # The 0, 1, 2, 3 prefixes ensure NTP pool round-robin + $OUT .= "server $_.$server\n" for (0..3); + } + else + { + $OUT .= "server $server\n"; + } } } diff --git a/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/40service b/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/40service index a96050c..cfb3b50 100644 --- a/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/40service +++ b/root/etc/e-smith/templates/usr/lib/systemd/system/ntpd.service.d/50koozali.conf/40service @@ -18,3 +18,4 @@ ExecStartPre=-/sbin/e-smith/expand-template /etc/ntp.conf ExecStartPre=-/sbin/e-smith/systemd/initializedate Restart=always +SyslogIdentifier=ntpd diff --git a/smeserver-ntp.spec b/smeserver-ntp.spec index 5661576..194b03d 100644 --- a/smeserver-ntp.spec +++ b/smeserver-ntp.spec @@ -4,7 +4,7 @@ Summary: smeserver specific NTP configuration files and templates %define name smeserver-ntp Name: %{name} %define version 11.0.0 -%define release 8 +%define release 9 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -21,6 +21,10 @@ Requires: smeserver-lib >= 1.15.1-19 AutoReqProv: no %changelog +* Fri Oct 31 2025 Jean-Philippe Pialasse 11.0.0-9.sme +- add missing template changes [SME: 12954] + set SyslogIdentifier + * Fri Oct 03 2025 Jean-Philippe Pialasse 11.0.0-8.sme - add support for multiple coma separated NTPServer [SME: 10623] - fix ntpd long to start if not ntp server set [SME: 12954]