From c8321c9cbee151b0617b369bed46a244805048c2 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Pialasse Date: Tue, 17 Dec 2024 11:43:59 -0500 Subject: [PATCH] * Tue Dec 17 2024 Jean-Philippe Pialasse 11.0.0-7.sme - remove unused template [SME: 12525] - fix action script [SME: 12590] --- createlinks | 2 +- root/etc/e-smith/events/actions/conf-timezone | 19 ++----------------- smeserver-ntp.spec | 6 +++++- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/createlinks b/createlinks index 0bfd5c6..2e5e05a 100755 --- a/createlinks +++ b/createlinks @@ -19,7 +19,7 @@ safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ntpd"); # Configuration template expansion of ntp.conf foreach my $file ( - qw(/etc/ntp/step-tickers /etc/ntp.conf /usr/lib//systemd/system/ntpd.service.d/50koozali.conf)) + qw(/etc/ntp.conf /usr/lib//systemd/system/ntpd.service.d/50koozali.conf)) { templates2events($file, qw( timeserver-update diff --git a/root/etc/e-smith/events/actions/conf-timezone b/root/etc/e-smith/events/actions/conf-timezone index bc7b485..b9e59a3 100644 --- a/root/etc/e-smith/events/actions/conf-timezone +++ b/root/etc/e-smith/events/actions/conf-timezone @@ -37,20 +37,8 @@ if (defined $timezone) } else { - # Initialise timezone from /etc/sysconfig/clock if not already set - if (open(CLOCK, "/etc/sysconfig/clock")) - { - while() - { - $timezone = $1 if /^ZONE="(.*)"/; - last if defined $timezone; - } - close(CLOCK) or warn("Could not close CLOCK: $!"); - } - else - { - warn("Could not open /etc/sysconfig/clock: $!"); - } + # Initialise timezone from timectl if not already set + $timezone=`timedatectl 2>/dev/null | grep "zone" | sed -e 's/^[ ]*Time zone: \(.*\) (.*)$/\1/g'`; # If all else fails ... $timezone = "US/Eastern" unless defined $timezone; $db->new_record('TimeZone')->set_value($timezone); @@ -60,7 +48,4 @@ else unlink "/etc/localtime"; symlink "../usr/share/zoneinfo/$timezone", "/etc/localtime"; -# Process the template for /etc/sysconfig/clock -processTemplate ({TEMPLATE_PATH => "/etc/sysconfig/clock"}); - exit (0); diff --git a/smeserver-ntp.spec b/smeserver-ntp.spec index 701100f..a989505 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 6 +%define release 7 Version: %{version} Release: %{release}%{?dist} License: GPL @@ -21,6 +21,10 @@ Requires: smeserver-lib >= 1.15.1-19 AutoReqProv: no %changelog +* Tue Dec 17 2024 Jean-Philippe Pialasse 11.0.0-7.sme +- remove unused template [SME: 12525] +- fix action script [SME: 12590] + * Wed Apr 17 2024 Jean-Philippe Pialasse 11.0.0-6.sme - update package for ntpsec [SME: 12590]