* Wed Apr 17 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-6.sme

- update package for ntpsec [SME: 12590]
This commit is contained in:
Jean-Philippe Pialasse 2024-04-17 14:55:55 -04:00
parent 63e4669589
commit 42c535335d
8 changed files with 7 additions and 48 deletions

View File

@ -63,7 +63,7 @@ event_link("conf-timezone", $event, "04");
$event = "smeserver-ntp-update";
foreach my $file (qw(/etc/ntp/step-tickers /etc/ntp.conf /usr/lib//systemd/system/ntpd.service.d/50koozali.conf /etc/systemd/system-preset/49-koozali.preset /etc/rsyslog.conf /etc/logrotate.d/ntpd))
foreach my $file (qw(/etc/ntp.conf /usr/lib//systemd/system/ntpd.service.d/50koozali.conf /etc/systemd/system-preset/49-koozali.preset /etc/rsyslog.conf /etc/logrotate.d/ntpd))
{
templates2events( $file, $event );
}

View File

@ -1,19 +0,0 @@
{
my $NTPenabled = $ntpd{'status'} || 'disabled';
my $server = $ntpd{NTPServer} || '';
if ($NTPenabled eq 'enabled')
{
if ($server =~ /pool.ntp.org/)
{
$OUT .= "0.$server";
}
else
{
$OUT .= "$server";
}
}
else
{
$OUT .= "# ntpd service is disabled";
}
}

View File

@ -1,5 +0,0 @@
{
my $timezone = $TimeZone || "US/Eastern";
$OUT .= "ZONE=\"$timezone\"";
}

View File

@ -1,3 +0,0 @@
{
$OUT .= "UTC=true";
}

View File

@ -1,3 +0,0 @@
{
$OUT .= "ARC=false";
}

View File

@ -1,25 +1,11 @@
#!/bin/bash
#first move old drift file if in the way
OLDFILE='/etc/ntp/drift'
NEWFILE='/var/lib/ntp/drift'
if [ -f "$NEWFILE" ]; then
if [ -f "$OLDFILE" ];then
/usr/bin/rm -f $OLDFILE
fi
else
if [ -f "$OLDFILE" ];then
/usr/bin/mv $OLDFILE $NEWFILE
fi
fi
if [ -f "$NEWFILE" ]; then
/usr/bin/chown ntp:ntp $NEWFILE
fi
# Run ntpdate so we're not way off on startup.
ntpstep=/etc/ntp/step-tickers
tickers=`/bin/sed -e 's/\#.*$//g' $ntpstep`
#get current date (will need to update this command soon to be retired : ntpd -q -x -g -g -g -g
/usr/sbin/ntpdate -b -p 8 $tickers
# force sync date and time
/usr/sbin/ntpd -q -x -g -g -g -g >/dev/null
# set hardware clock to the current time
/usr/sbin/hwclock --systohc
exit 0

View File

@ -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 5
%define release 6
Version: %{version}
Release: %{release}%{?dist}
License: GPL
@ -21,6 +21,9 @@ Requires: smeserver-lib >= 1.15.1-19
AutoReqProv: no
%changelog
* Wed Apr 17 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-6.sme
- update package for ntpsec [SME: 12590]
* Thu Apr 04 2024 Brian Read <brianr@koozali.org> 11.0.0-5.sme
- Update createlinks to create smeserver-package-update event[SME: 12579]