Compare commits
6 Commits
11_0_0-5_e
...
master
Author | SHA1 | Date | |
---|---|---|---|
c8321c9cbe | |||
a181d8a0e9 | |||
d637440320 | |||
7107fa74be | |||
fc3768902e | |||
42c535335d |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
*.log
|
*.log
|
||||||
*spec-20*
|
*spec-20*
|
||||||
*.tar.xz
|
*.tar.xz
|
||||||
|
*.bak
|
||||||
|
@@ -6,7 +6,14 @@ SMEServer Koozali developed git repo for smeserver-ntp smeserver
|
|||||||
<br />https://wiki.koozali.org/
|
<br />https://wiki.koozali.org/
|
||||||
|
|
||||||
## Bugzilla
|
## Bugzilla
|
||||||
Show list of outstanding bugs: [here](https://bugs.koozali.org/buglist.cgi?component=smeserver-ntp&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)\
|
Show list of outstanding bugs:
|
||||||
|
[All](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=NEEDINFO&bug_status=IN_PROGRESS&bug_status=RESOLVED&bug_status=VERIFIED&cf_package=smeserver-ntp&classification=SME+Server&list_id=105756&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
|
||||||
|
[Confirmed](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=CONFIRMED&cf_package=smeserver-ntp&classification=SME+Server&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
|
||||||
|
[Unconfirmed](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=UNCONFIRMED&cf_package=smeserver-ntp&classification=SME+Server&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
|
||||||
|
[Need info](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=NEEDINFO&cf_package=smeserver-ntp&classification=SME+Server&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
|
||||||
|
[In progress](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=IN_PROGRESS&cf_package=smeserver-ntp&classification=SME+Server&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
|
||||||
|
[Resolved](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=RESOLVED&cf_package=smeserver-ntp&classification=SME+Server&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
|
||||||
|
[Verified](https://bugs.koozali.org/buglist.cgi?action=wrap&bug_status=VERIFIED&cf_package=smeserver-ntp&classification=SME+Server&order=changeddate+DESC%2Ccomponent%2Cpriority%2Cbug_severity&query_format=advanced)
|
||||||
And a list of outstanding Legacy bugs: (e-smith-ntp) [here](https://bugs.koozali.org/buglist.cgi?component=e-smith-ntp&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
|
And a list of outstanding Legacy bugs: (e-smith-ntp) [here](https://bugs.koozali.org/buglist.cgi?component=e-smith-ntp&product=SME%20Server%2010.X&query_format=advanced&limit=0&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=CONFIRMED)
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
@@ -19,7 +19,7 @@ safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ntpd");
|
|||||||
|
|
||||||
# Configuration template expansion of ntp.conf
|
# Configuration template expansion of ntp.conf
|
||||||
foreach my $file (
|
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(
|
templates2events($file, qw(
|
||||||
timeserver-update
|
timeserver-update
|
||||||
@@ -63,7 +63,7 @@ event_link("conf-timezone", $event, "04");
|
|||||||
|
|
||||||
$event = "smeserver-ntp-update";
|
$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 );
|
templates2events( $file, $event );
|
||||||
}
|
}
|
||||||
|
@@ -37,20 +37,8 @@ if (defined $timezone)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
# Initialise timezone from /etc/sysconfig/clock if not already set
|
# Initialise timezone from timectl if not already set
|
||||||
if (open(CLOCK, "/etc/sysconfig/clock"))
|
$timezone=`timedatectl 2>/dev/null | grep "zone" | sed -e 's/^[ ]*Time zone: \(.*\) (.*)$/\1/g'`;
|
||||||
{
|
|
||||||
while(<CLOCK>)
|
|
||||||
{
|
|
||||||
$timezone = $1 if /^ZONE="(.*)"/;
|
|
||||||
last if defined $timezone;
|
|
||||||
}
|
|
||||||
close(CLOCK) or warn("Could not close CLOCK: $!");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
warn("Could not open /etc/sysconfig/clock: $!");
|
|
||||||
}
|
|
||||||
# If all else fails ...
|
# If all else fails ...
|
||||||
$timezone = "US/Eastern" unless defined $timezone;
|
$timezone = "US/Eastern" unless defined $timezone;
|
||||||
$db->new_record('TimeZone')->set_value($timezone);
|
$db->new_record('TimeZone')->set_value($timezone);
|
||||||
@@ -60,7 +48,4 @@ else
|
|||||||
unlink "/etc/localtime";
|
unlink "/etc/localtime";
|
||||||
symlink "../usr/share/zoneinfo/$timezone", "/etc/localtime";
|
symlink "../usr/share/zoneinfo/$timezone", "/etc/localtime";
|
||||||
|
|
||||||
# Process the template for /etc/sysconfig/clock
|
|
||||||
processTemplate ({TEMPLATE_PATH => "/etc/sysconfig/clock"});
|
|
||||||
|
|
||||||
exit (0);
|
exit (0);
|
||||||
|
@@ -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";
|
|
||||||
}
|
|
||||||
}
|
|
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
my $timezone = $TimeZone || "US/Eastern";
|
|
||||||
|
|
||||||
$OUT .= "ZONE=\"$timezone\"";
|
|
||||||
}
|
|
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
$OUT .= "UTC=true";
|
|
||||||
}
|
|
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
$OUT .= "ARC=false";
|
|
||||||
}
|
|
@@ -1,25 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#first move old drift file if in the way
|
|
||||||
OLDFILE='/etc/ntp/drift'
|
|
||||||
NEWFILE='/var/lib/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
|
if [ -f "$NEWFILE" ]; then
|
||||||
/usr/bin/chown ntp:ntp $NEWFILE
|
/usr/bin/chown ntp:ntp $NEWFILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run ntpdate so we're not way off on startup.
|
# force sync date and time
|
||||||
ntpstep=/etc/ntp/step-tickers
|
/usr/sbin/ntpd -q -x -g -g -g -g >/dev/null
|
||||||
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
|
|
||||||
# set hardware clock to the current time
|
# set hardware clock to the current time
|
||||||
/usr/sbin/hwclock --systohc
|
/usr/sbin/hwclock --systohc
|
||||||
exit 0
|
exit 0
|
||||||
|
@@ -4,7 +4,7 @@ Summary: smeserver specific NTP configuration files and templates
|
|||||||
%define name smeserver-ntp
|
%define name smeserver-ntp
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
%define version 11.0.0
|
%define version 11.0.0
|
||||||
%define release 5
|
%define release 7
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: %{release}%{?dist}
|
Release: %{release}%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
@@ -21,6 +21,13 @@ Requires: smeserver-lib >= 1.15.1-19
|
|||||||
AutoReqProv: no
|
AutoReqProv: no
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 17 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-7.sme
|
||||||
|
- remove unused template [SME: 12525]
|
||||||
|
- fix action script [SME: 12590]
|
||||||
|
|
||||||
|
* 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
|
* Thu Apr 04 2024 Brian Read <brianr@koozali.org> 11.0.0-5.sme
|
||||||
- Update createlinks to create smeserver-package-update event[SME: 12579]
|
- Update createlinks to create smeserver-package-update event[SME: 12579]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user