initial commit of file from CVS for e-smith-ntp on Wed 12 Jul 09:00:21 BST 2023

This commit is contained in:
Brian Read 2023-07-12 09:00:21 +01:00
parent 59f5643b62
commit 4d143a42fe
37 changed files with 3230 additions and 2 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.rpm
*.log
*spec-20*
*.tar.xz

21
Makefile Normal file
View File

@ -0,0 +1,21 @@
# Makefile for source rpm: e-smith-ntp
# $Id: Makefile,v 1.1 2016/02/05 22:20:33 stephdl Exp $
NAME := e-smith-ntp
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -1,3 +1,17 @@
# e-smith-ntp # <img src="https://www.koozali.org/images/koozali/Logo/Png/Koozali_logo_2016.png" width="25%" vertical="auto" style="vertical-align:bottom"> e-smith-ntp
SMEServer Koozali developed git repo for e-smith-ntp smeserver SMEServer Koozali developed git repo for e-smith-ntp smeserver
## Wiki
<br />https://wiki.koozali.org/
## Bugzilla
Show list of outstanding bugs: [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
<br />*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*
*Once it has been checked, then this comment will be deleted*
<br />
e-Smith-NTP is an open source software package designed to assist network administrators with the task of synchronizing computers on a network with an accurate time source. It is a secure, reliable, and highly accurate time server software package that is designed to work with virtually any computer system. In addition to providing an accurate time source, e-Smith-NTP also offers a range of features such as secure authentication of user accounts, and the ability to configure the time synchronization settings to suit individual requirements. e-Smith-NTP is a highly secure and reliable software package that is ideal for any business or organization that is looking for a reliable and accurate time source for their network.

340
additional/COPYING Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

665
additional/e-smith-ntp.spec Normal file
View File

@ -0,0 +1,665 @@
Summary: e-smith specific NTP configuration files and templates
%define name e-smith-ntp
Name: %{name}
%define version 1.15.2
%define release 01
Version: %{version}
Release: %{release}
License: GPL
Group: Networking/Daemons
Source: %{name}-%{version}.tar.gz
Packager: e-smith developers <bugs@e-smith.com>
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
BuildArchitectures: noarch
BuildRequires: e-smith-devtools >= 1.13.1-03
Requires: e-smith-base
Requires: ntp
Requires: e-smith-lib >= 1.15.1-19
AutoReqProv: no
%changelog
* Fri Oct 14 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.15.2-01]
- Remove L10Ns from base packages [SF: 1309520]
* Fri Oct 14 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.15.1-01]
- New dev stream before relocating L10Ns
* Fri Sep 30 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.15.0-14]
- Added Italian L10N - Thanks Filippo Carletti [SF: 1309266]
* Mon Sep 26 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.15.0-13]
- Added German L10N - Thanks Dietmar Berteld [SF: 1293325]
* Wed Aug 31 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-12]
- Enforce minimum value of content of env/MEMLIMIT file. [SF: 1270649]
* Tue Aug 23 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-11]
- Fix update of /etc/localtime symlink after update via panel. [SF: 1264801]
* Wed Aug 17 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-10]
- Remove /etc/ntp.conf in %pre script, to work around
problems with update of ntpd RPM. Add conditional expand-template
to run script to be sure that file is regenerated before we need
it. [SF: 1237968]
* Fri Aug 12 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-09]
- Open config db r/w to allow property update. [SF: 1216546]
* Tue Jul 19 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-08]
- Update to current db access APIs. [SF: 1216546]
* Thu Jun 23 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-07]
- Increase MemLimit setting to 6MB (for CentOS4 build). [SF: 1225925]
- Remove obsolete "authenticate" directive from ntpd.conf. [SF: 1225925]
* Thu Jun 16 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-06]
- Ensure that 'status' property is recognised at startup. [MN00061795]
* Thu Mar 31 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-05]
- Add default fragment for MemLimit property of ntp service.
[MN00064130]
* Thu Mar 31 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-04]
- Remove explicity call of generic_template_expand - it's now
implicit. [MN00064130]
* Tue Mar 8 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-03]
- Fix template expansion of /etc/ntp/step-tickers and ./env/MEMLIMIT
[MN00064130]
- Use generic service adjust action for reload/restart. [MN00065576]
* Tue Jan 25 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-02]
- Combine set-date and set-clock, and use a shell script rather than
perl. [MN00064941]
- Use generic_template_expand action where possible, in place
of specific actions. Update e-smith-lib dependency. [MN00064130]
* Tue Jan 25 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-01]
- Changing version to development stream number - 1.15.0
* Thu Nov 11 2004 Michael Soulier <msoulier@e-smith.com>
- [1.14.0-02]
- Patched stderr "leaking" from ntpdate call. [msoulier MN00056927]
* Wed Nov 3 2004 Charlie Brady <charlieb@e-smith.com>
- [1.14.0-01]
- Changing version to stable stream number - 1.14.0
* Tue Oct 19 2004 Gordon Rowell <gordonr@e-smith.com>
- [1.13.0-21]
- pool.ntp.org now uses 0, 1, 2 prefixes rather than relying on
short DNS TTLs. So, we need to add the prefixes if we are talking
with pool.ntp.org or {region}.pool.ntp.org and revert to listing
"normal" NTP servers once [gordonr MN00053174]
* Mon Oct 18 2004 Gordon Rowell <gordonr@e-smith.com>
- [1.13.0-20]
- List the ntp server three times, for DNS round-robin servers,
such as pool.ntp.org, {region}.pool.ntp.org and time.nrc.ca
- [gordonr MN00053174]
* Tue Sep 28 2004 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-19]
- Convert ntp.conf/10localhost template fragment from DOS text format
[charlieb MN00050805]
* Tue Sep 28 2004 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-18]
- Convert ntp.conf/30other template fragment from DOS text format
[charlieb MN00050805]
- Don't create pid file, and remove one if we find an old one.
[charlieb MN00050806]
- ntpdate should log to standard output, not to syslog. [charlieb MN00049205]
* Tue Sep 28 2004 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-17]
- Need to create empty /service/ntpd/env directory for template to be
expanded into. [charlieb MN00050192]
* Tue Sep 28 2004 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-16]
- Increase memory limit for running ntpd. While we are at it,
we'll make the value templated, and update code in conf-ntpd
to modern standards. [charlieb MN00050192]
* Tue Sep 28 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-15]
- Fixed logging to go to stdout. [msoulier MN00049205]
* Fri Sep 3 2004 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-14]
- Clean BuildRequires. [charlieb MN00043055]
* Wed May 5 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-13]
- Fixed a logic error from last change. [msoulier MN00027900]
* Wed May 5 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-12]
- Added localhost as a stratum 10 server. [msoulier MN00027900]
* Wed Jan 28 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-11]
- Added ntpdate call to run script. [msoulier 10929]
* Thu Jan 22 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-10]
- Raised the softlimit for ntpd. libc is big. :) [msoulier 10929]
* Thu Jan 22 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-09]
- Moved proxy-start/stop to e-smith-proxy where they belong. [msoulier 10929]
* Thu Jan 22 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-08]
- Fixed missing directives to genfilelist. [msoulier 10586]
* Thu Jan 22 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-07]
- Fixed a typo in createlinks. The new ntpd initscript must not conflict with
the one in the ntpd package. [msoulier 10586]
* Wed Jan 21 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-06]
- Removing old symlink creation and moving to createlinks. [msoulier 10586]
* Wed Jan 21 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-05]
- Adding supervision of ntpd. [msoulier 10586]
* Fri Nov 7 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.13.0-04]
- Enable ntpd by default [gordonr 10566]
* Fri Nov 7 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.13.0-03]
- Default time server to pool.ntp.org [gordonr 10566]
* Tue Jul 22 2003 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-02]
- Remove deprecated -startup script, and add default db
fragments [charlieb 9553]
- s/Copyright/License/
* Tue Jul 8 2003 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-01]
- Changing version to development stream number - 1.13.0
* Thu Jun 26 2003 Charlie Brady <charlieb@e-smith.com>
- [1.12.0-01]
- Changing version to stable stream number - 1.12.0
* Fri May 9 2003 Tony Clayton <apc@e-smith.com>
- [1.11.0-22]
- Fix save button justification [tonyc 1588]
* Tue May 6 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-21]
- Add Spanish lexicon for datetime panel [lijied 3793]
* Thu May 1 2003 Tony Clayton <apc@e-smith.com>
- [1.11.0-20]
- Background the timeserver-update event in panel [tonyc 1588]
* Wed Apr 30 2003 Tony Clayton <apc@e-smith.com>
- [1.11.0-19]
- Fix datetime panel when ntp stays disabled [tonyc 1588]
- Show date when ntp is enabled [tonyc 1588]
* Thu Apr 17 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.11.0-18]
- Start ntp after external network is (possibly) up [gordonr 8391]
* Thu Apr 10 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-17]
- Change $q->table back [lijied 8034]
* Wed Apr 9 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-16]
- Added French trans for "Set Date and Time" [lijied 7949]
* Fri Apr 4 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-15]
- Changed $q->table to $->start_table where necessary [lijied 8034]
* Thu Apr 3 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-14]
- Removed en-us and fr 'Mitel Networks SME Server' branding [lijied 8016]
* Tue Apr 1 2003 Tony Clayton <apc@e-smith.com>
- [1.11.0-13]
- Fix datetime to loop back to Initial page w/ status report [tonyc 1588]
- Fix link to Verify page [tonyc 1588]
* Tue Apr 1 2003 Tony Clayton <apc@e-smith.com>
- [1.11.0-12]
- Add container table to fix IE 6 handling of table-layout: fixed [tonyc 1588]
- Remove redundant newlines from some print statements [tonyc 1588]
* Fri Mar 28 2003 Tony Clayton <apc@e-smith.com>
- [1.11.0-11]
- Update fr l10n strings [tonyc 1588]
* Thu Mar 27 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-10]
- Major refactoring and cleanup of datetime.pm [tonyc 1588]
- Expand tabs to spaces in datetime.pm [tonyc 1588]
- Add radio buttons and don't allow setting date manually when ntp is enabled
[tonyc 1588]
- Modified French lexicon to use lang="fr", rename the lexicon
directory to fr [lijied 6787]
* Mon Mar 17 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-09]
- Deleted inappropriate template-begin file
deleted empty template-end files [lijied 3295]
* Thu Mar 6 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-08]
- Modified datetime panel order [lijied 7356]
* Tue Mar 4 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-07]
- Split en-us lexicon from datetime panel [lijied 4030]
* Mon Mar 3 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-06]
- Add French lexicon for datetime [lijied 5003]
* Thu Jan 16 2003 Mark Knox <markk@e-smith.com>
- [1.11.0-05]
- Use new gen_locale_date_string routine [markk 3357]
* Fri Dec 27 2002 Mike Dickson <miked@e-smith.com>
- [1.11.0-04]
- updated the datetime panel to use css [miked 5494]
* Tue Dec 10 2002 Mike Dickson <miked@e-smith.com>
- [1.11.0-03]
- ui update [miked 5494]
* Thu Nov 21 2002 Mike Dickson <miked@e-smith.com>
- [1.11.0-02]
- update to new UI system [miked 5494]
* Wed Nov 20 2002 Mike Dickson <miked@e-smith.com>
- [1.11.0-01]
- Changing to development stream; version upped to 1.11.0
* Fri Oct 11 2002 Charlie Brady <charlieb@e-smith.com>
- [1.10.0-01]
- Rolling stable version number to 1.10.0
* Fri Aug 23 2002 Mark Knox <markk@e-smith.com>
- [1.9.4-01]
- Fixed duplicate English-only footers in panel [markk 3615]
* Mon Aug 19 2002 Charlie Brady <charlieb@e-smith.com>
- [1.9.3-01]
- Remove masq script update and restart symlinks. They are no longer
needed not that we have connection tracking enabled. [charlieb 4501]
- Add rc7.d symlink, and don't set obsolete InitscriptsOrder property
[charlieb 4458]
* Thu Aug 8 2002 Charlie Brady <charlieb@e-smith.com>
- [1.9.2-01]
- Remove NTP masq template fragment. We no longer need it, as netfilter
connection tracking allows NTP replies. [charlieb 4499]
* Wed Jul 17 2002 Charlie Brady <charlieb@e-smith.com>
- [1.9.1-01]
- Change masq script fragment to use iptables. [charlieb 1268]
* Wed Jun 5 2002 Charlie Brady <charlieb@e-smith.com>
- [1.9.0-01]
- Changing version to development stream number - 1.9.0
* Fri May 31 2002 Charlie Brady <charlieb@e-smith.com>
- [1.8.0-01]
- Changing version to maintained stream number to 1.8.0
* Thu May 23 2002 Gordon Rowell <gordonr@e-smith.com>
- [1.7.5-01]
- RPM rebuild forced by cvsroot2rpm
* Wed May 8 2002 Mark Knox <markk@e-smith.com>
- [1.7.4-01]
- Subst <base> -> </base> in lexicon [markk 3309]
* Tue May 7 2002 Gordon Rowell <gordonr@e-smith.com>
- [1.7.3-01]
- Localised "Network Time Server" heading [markk 3311]
- Localised date display [markk 3311]
- Added nav bar entry [gordonr 3155]
* Mon Apr 15 2002 Mark Knox <markk@e-smith.com>
- [1.7.2-01]
- Moved all code into module datetime.pm [markk 3159]
- Converted to FormMagick panel and internationalized [markk 3159]
- Added POD and testsuite [markk 3159]
* Fri Apr 5 2002 Kirrily Robert <skud@e-smith.com>
- [1.7.1-01]
- Testing CVS import
* Fri Apr 5 2002 Kirrily Robert <skud@e-smith.com>
- [1.7.0-01]
- rollRPM: Rolled version number to 1.7.0-01. Includes patches up to 1.6.0-01.
* Tue Dec 11 2001 Jason Miller <jay@e-smith.com>
- [1.6.0-01]
- rollRPM: Rolled version number to 1.6.0-01. Includes patches up to 1.5.0-02.
* Tue Nov 06 2001 Charlie Brady <charlieb@e-smith.com>
- [1.5.0-02]
- Initialise TimeZone db setting from /etc/sysconfig/clock if not set
- Branding changes in web panel.
* Tue Nov 6 2001 Charlie Brady <charlieb@e-smith.com>
- [1.5.0-01]
- Rolled version number to 1.5.0-01. Includes patches upto 1.4.0-03.
* Tue Aug 28 2001 Gordon Rowell <gordonr@e-smith.com>
- [1.4.0-03]
- Removed deprecated post-restore event directory
* Fri Aug 17 2001 gordonr
- [1.4.0-02]
- Autorebuild by rebuildRPM
* Wed Aug 8 2001 Charlie Brady <charlieb@e-smith.com>
- [1.4.0-01]
- Rolled version number to 1.4.0-01. Includes patches upto 1.3.0-06.
* Thu Aug 02 2001 Gordon Rowell <gordonr@e-smith.com>
- [1.3.0-06]
- More branding changes
* Sun Jul 29 2001 Jason Miller <jmiller@e-smith.com>
- [1.3.0-05]
- Branding text changes to the datetime web panel
* Tue Jul 17 2001 Jason Miller <jmiller@e-smith.com>
- [1.3.0-04]
- Patch to datetime panel to fix mismatched section headers
* Tue May 29 2001 Tony Clayton <tonyc@e-smith.com>
- [1.3.0-03]
- fixed actions that had tied %conf when calling serviceControl (4 actions)
* Wed Apr 11 2001 Adrian Chung <adrianc@e-smith.com>
- [1.3.0-02]
- changing h4 tags to paragraph bold tags.
* Wed Apr 11 2001 Adrian Chung <mac@e-smith.com>
- [1.3.0-01]
- Rolled version number to 1.3.0-01. Includes patches upto 1.2.0-13.
* Fri Feb 23 2001 Paul Nesbit <pkn@e-smith.com>
- [1.2.0-13]
- Fixed conf-timezone to properly handle timezone after restore
* Mon Feb 12 2001 Adrian Chung <adrianc@e-smith.com>
- Roll release number for GPG signing.
* Mon Feb 12 2001 Charlie Brady <charlieb@e-smith.com>
- [1.2.0-12]
- Expand ntp.conf always, even when ntpd is disabled. Otherwise ntpd
refuses to shut down.
* Fri Feb 9 2001 Adrian Chung <adrianc@e-smith.com>
- Added restart-crond to timezone-update event.
* Thu Feb 8 2001 Adrian Chung <adrianc@e-smith.com>
- Rolling release number for GPG signing.
* Wed Feb 07 2001 Charlie Brady <charlieb@e-smith.com>
- [1.2.0-08]
- Add some missing event symlinks
* Sun Feb 04 2001 Gordon Rowell <gordonr@e-smith.com>
- [1.2.0-07]
- Loop through all addresses in case NTPServer refers to multiple IPs
* Fri Feb 02 2001 Gordon Rowell <gordonr@e-smith.com>
- [1.2.0-06]
- Build ip masq rule with IP address of NTP server
* Tue Jan 30 2001 Jason Miller <jmiller@e-smith.com>
- [1.2.0-05]
- Updated datetime panel to run the timeserver-update
event (added rules to make sure that updates to the
configuration database aren't affected UnsavedChanges flag).
* Tue Jan 30 2001 Jason Miller <jmiller@e-smith.com>
- [1.2.0-04]
- Added a comment in the ipchains rules
- Added symlinks for the conf-masq and restart-masq actions
to be run as part of timeserver-update event (thereby
expanding the /etc/rc.d/init.d/masq template).
* Sat Jan 27 2001 Charlie Brady <charlieb@e-smith.com>
- [1.2.0-03]
- Change ref to %conf => %services in masq template fragment
* Thu Jan 25 2001 Peter Samuel <peters@e-smith.com>
- [1.2.0-02]
- Fix perl syntax error in masq template fragment
- Save/restore unsavedchanges flag around timezone change.
* Thu Jan 25 2001 Peter Samuel <peters@e-smith.com>
- [1.2.0-01]
- Rolled version number to 1.2.0-01. Includes patches upto 1.1.0-28.
* Wed Jan 24 2001 Charlie Brady <charlieb@e-smith.com>
- [1.1.0-28]
- Remove restart-ntp from post-upgrade action
- Remove post-restore event
- Tighten up NTP packet filter rule.
- Remove conf-ntpd from ip-change event
- Remove duplication of timezone migration code - it is in base as well.
* Wed Jan 24 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-27]
- Changed conf-timezone action so that during an upgrade
it will preserve the existing symlink for /etc/localtime
and use that value to set the configuration database
value for TimeZone
* Wed Jan 24 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-26]
- removed the signal event for datetime-set in the datetime
web panel
* Wed Jan 24 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-25]
- combined the timezone-update and datetime-set events
into a single event (and might combine the action scripts
as well)
* Wed Jan 24 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-24]
- added new service control mechanism to not background
the proxy-stop action to shutdown squid
* Tue Jan 23 2001 Jason Miller <jmiller@e-smith.com>
- moved all date and time settings into a new event/action
sequence (datetime-set) which then calls the proxy-stop,
set-date, set-clock, proxy-start and removed the previous
system calls from the web manager form
- removed the squid stop/start actions from conf-timezone
action
* Mon Jan 22 2001 Jason Miller <jmiller@e-smith.com>
- Updated createlinks to have update-timezone and
update-timeserver events link in the action restart-syslog
to improve on the strange log times recorded otherwise
* Mon Jan 22 2001 Jason Miller <jmiller@e-smith.com>
- Added service control to stop the proxy server (squid)
from running prior to changing the timezone information
in conf-timezone, then starting it again after the change
to remove squid hangups on shutdown
* Mon Jan 22 2001 Gordon Rowell <gordonr@e-smith.com>
- Added NTP fragment to packet filter - Thanks Bernd Leibing
* Tue Jan 16 2001 Jason Miller <jmiller@e-smith.com>
- Removed the %postun section which was deleting ntpd
configuration values after uninstalling e-smith-ntp
(which occurs in an upgrade) and the %post section
which expanded the templates for ntpd without checking
the status (now done properly in the actions)
* Tue Jan 16 2001 Jason Miller <jmiller@e-smith.com>
- Fixed the /etc/ntp.conf template expansion to pull
the NTPServer value from the ntpd service configuration
settings
* Tue Jan 16 2001 Jason Miller <jmiller@e-smith.com>
- Changed the order of system time setting:
- Set timezone first, then clock settings
* Fri Jan 12 2001 Jason Miller <jmiller@e-smith.com>
- Merged the conf-clock and reset-link into a single
action script of conf-timezone
- Removed symlinks to post-upgrade and update-timezone
- Added symlink for conf-timezone to update-timezone
- Added symlink for conf-timezone to bootstrap-console-save
(instead of post-upgrade)
* Fri Jan 12 2001 Jason Miller <jmiller@e-smith.com>
- Added reset-link and conf-clock to the post-upgrade
event
* Fri Jan 12 2001 Gordon Rowell <gordonr@e-smith.com>
- Added conf-ntpd-startup
* Thu Jan 11 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-13]
- remove extra signal events based on what time setting
choice gets made
* Thu Jan 11 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-12]
- updated datetime panel to take into account the new
action scripts called by timezone-update event
* Thu Jan 11 2001 Gordon Rowell <gordonr@e-smith.com>
- [1.1.0-11]
- use serviceControl()
* Thu Jan 11 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-10]
- fixed /etc/sysconfig/clock template generation
* Thu Jan 11 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-9]
- added conf-clock to configure /etc/sysconfig/clock
- added reset-link to unlink and re-symlink
/etc/localtime to the correct timezone
* Sat Jan 6 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-7]
- Charlie changed spec file in %post and %postun to
generate ntpd templates in runlevel 7 and to remove
it if e-smith-ntp is uninstalled
- Added configuration parameter for timeZone which
will be used by default as the timezone value for
date and time, otherwise it defaults to /etc/localtime
* Fri Jan 5 2001 Adrian Chung <adrianc@e-smith.com>
- [1.1.0-6]
- add new event timezone-update that calls restart httpd
- datetime panel modified to call both time{server,zone}-update
* Fri Jan 5 2001 Charlie Brady <charlieb@e-smith.com>
- [1.1.0-5]
- Disable ntpd by default - without an NTPServer setting there's no
point in enabling ntpd.
- Remove timeserver web form. Add Jay's new combined datetime and
timeserver form.
* Fri Dec 15 2000 Adrian Chung <adrianc@e-smith.com>
- Changed NTPserver to NTPServer in 00timeServer fragment
- Modified timeserver panel to record timeserver value to ntpd
property instead of legacy variable.
* Wed Dec 6 2000 Adrian Chung <adrianc@e-smith.com>
- Removed 'private' property setting in conf-ntpd
- Added link for conf-ntpd to post-install
* Wed Dec 6 2000 Adrian Chung <adrianc@e-smith.com>
- Re-rolled tar ball to get rid of symlinks
* Mon Dec 4 2000 Adrian Chung <adrianc@e-smith.com>
- Initial release
%description
Configuration files and templates for the NTP daemon.
%prep
%setup
%build
for i in ip-change post-install post-upgrade timeserver-update \
timezone-update bootstrap-console-save
do
mkdir -p root/etc/e-smith/events/$i
done
perl createlinks
/sbin/e-smith/buildtests 30e-smith-datetime
# Manage supervise and multilog.
mkdir -p root/service
ln -s ../var/service/ntpd root/service/ntpd
mkdir -p root/var/service/ntpd/supervise
mkdir -p root/var/service/ntpd/env
touch root/var/service/ntpd/down
mkdir -p root/var/service/ntpd/log/supervise
mkdir -p root/var/log/ntpd
%install
rm -rf $RPM_BUILD_ROOT
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
/sbin/e-smith/genfilelist \
--dir '/var/service/ntpd' 'attr(1755,root,root)' \
--file '/var/service/ntpd/down' 'attr(0644,root,root)' \
--file '/var/service/ntpd/run' 'attr(0755,root,root)' \
--dir '/var/service/ntpd/supervise' 'attr(0700,root,root)' \
--dir '/var/service/ntpd/env' '%attr(0755,root,root)' \
--file '/var/service/ntpd/env/MEMLIMIT' 'attr(0644,root,root)' \
--dir '/var/service/ntpd/log' 'attr(1755,root,root)' \
--file '/var/service/ntpd/log/run' 'attr(0755,root,root)' \
--dir '/var/log/ntpd' 'attr(2750,smelog,nofiles)' \
$RPM_BUILD_ROOT > %{name}-%{version}-filelist
echo "%doc COPYING" >> %{name}-%{version}-filelist
%clean
rm -rf $RPM_BUILD_ROOT
%pre
rm -f /etc/ntp.conf
%preun
%post
%postun
%files -f %{name}-%{version}-filelist
%defattr(-,root,root)

1
contriborbase Normal file
View File

@ -0,0 +1 @@
sme10

78
createlinks Executable file
View File

@ -0,0 +1,78 @@
#!/usr/bin/perl -w
use esmith::Build::CreateLinks qw(:all);
#--------------------------------------------------
# actions for manager panel
#--------------------------------------------------
my $panel = "manager";
panel_link("datetime", $panel);
#--------------------------------------------------
# actions for ip-change event
#--------------------------------------------------
$event = "ip-change";
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))
{
templates2events($file, qw(
timeserver-update
bootstrap-console-save
));
}
#--------------------------------------------------
# actions for timeserver-update event
#--------------------------------------------------
$event = "timeserver-update";
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ntpd");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
#--------------------------------------------------
# actions for timezone-update event
#--------------------------------------------------
$event = "timezone-update";
event_link("conf-timezone", $event, "30");
event_link("set-time-date", $event, "40");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/crond");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/squid");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
#--------------------------------------------------
# actions for bootstrap-console-save event
#--------------------------------------------------
$event = "bootstrap-console-save";
event_link("conf-timezone", $event, "04");
#--------------------------------------------------
# actions for e-smith-ntp-update event
#--------------------------------------------------
$event = "e-smith-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))
{
templates2events( $file, $event );
}
event_link("systemd-default", $event, "10");
event_link("conf-timezone", $event, "30");
event_link("systemd-reload", $event, "50");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/ntpd");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyslog");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/squid");
safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");

829
e-smith-ntp.spec Normal file
View File

@ -0,0 +1,829 @@
# $Id: e-smith-ntp.spec,v 1.21 2023/02/06 07:14:17 jpp Exp $
Summary: e-smith specific NTP configuration files and templates
%define name e-smith-ntp
Name: %{name}
%define version 2.6.0
%define release 19
Version: %{version}
Release: %{release}%{?dist}
License: GPL
Group: Networking/Daemons
Source: %{name}-%{version}.tar.xz
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
BuildArchitectures: noarch
BuildRequires: e-smith-devtools >= 1.13.1-03
Requires: e-smith-formmagick >= 1.4.0-9
Requires: e-smith-base
Requires: ntp
Requires: e-smith-lib >= 1.15.1-19
AutoReqProv: no
%changelog
* Wed Jul 12 2023 cvs2git.sh aka Brian Read <brianr@koozali.org> 2.6.0-19.sme
- Roll up patches and move to git repo [SME: 12338]
* Wed Jul 12 2023 BogusDateBot
- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday,
by assuming the date is correct and changing the weekday.
* Mon Feb 06 2023 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-18.sme
- fix noise about chown on driftfile [SME: 12177]
* Wed Jul 20 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-17.sme
- dedicated log and logrotate [SME: 12115]
thanks to bunkobugsy for this patch
* Sun Jul 17 2022 Jean-Philippe Pialasse <tests@pialasse.com> 2.6.0-15.sme
- untainting fields [SME: 12107]
* Sun Jan 03 2021 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-13.sme
- fix ntpd crashing with panic_stop [SME: 11298]
* Sun Dec 13 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-12.sme
- update override.conf to 50koozali.conf [SME: 11008]
* Sun Nov 29 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-11.sme
- adding missing folder /usr/lib/systemd/system/ntpd.service.d [SME: 11008]
* Sun Nov 29 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-10.sme
- fix typo in path for new driftfile [SME: 8881]
* Fri Nov 27 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-9.sme
- fix systemd-preset fragment [SME: 11008]
add +x to ExecStartPRe script
* Thu Nov 26 2020 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-8.sme
- improve systemd integration [SME: 11008]
- change driftfile path [SME: 8881]
* Wed Sep 23 2020 Michel Begue <mab974@gmail.com> 2.6.0-6.sme
- from service to systemd [SME: 11008]
- add ntpd-update event [SME: 11009]
* Fri Jan 25 2019 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-5.sme
- revert last change [SME: 10190]
on sme10 systemd has ntpd disabled by default
* Fri Jan 25 2019 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-5.sme
- revert last change [SME: 10190]
on sme10 systemd has ntpd disabled by default
* Wed Nov 15 2017 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-4.sme
- added post transaction rule for ntp [SME: 10190]
- thank you to Stefano Zamboni for this work
* Fri Jul 22 2016 Jean-Philipe Pialasse <tests@pialasse.com> 2.6.0-3.sme
- fix wrong link to restart rsyslog [SME: 9690]
* Thu May 12 2016 Daniel Berteaud <daniel@firewall-services.com> 2.6.0-2.sme
- Rebuild for [SME: 9393]
* Fri Feb 05 2016 stephane de Labrusse <stephdl@de-labrusse.fr> 2.6.0-1.sme
- Initial release to sme10
* Sat Jan 3 2015 Charlie Brady <charlieb.brady@mitel.com> 2.4.0-6.sme
- Allow ntp status queries from localhost. [SME: 8764]
* Mon Feb 3 2014 chris burnat <devlist@burnat.com> 2.4.0-5.sme
- Prevent server being used in NTP amplification attacks.
- Code by Jesper Holck [SME: 8181]
* Fri Mar 22 2013 Daniel Berteaud <daniel@firewall-services.com> 2.4.0-4.sme
- Increase memory limit [SME: 7502]
* Mon Feb 4 2013 Ian Wells <esmith@wellsi.com> 2.4.0-3.sme
- Remove default and migrate fragments for ntpd memory limit [SME: 7243]
* Mon Feb 4 2013 Ian Wells <esmith@wellsi.com> 2.4.0-2.sme
- Increase memory limit for ntpd [SME: 7243]
* Fri Feb 1 2013 Ian Wells <esmith@wellsi.com> 2.4.0-1.sme
- Rolling for SME 9
* Fri Oct 07 2011 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-5.sme
Tue Oct 07 2011 --> Tue Oct 04 2011 or Fri Oct 07 2011 or Tue Oct 11 2011 or ....
- Set the TimeZone property earlier, so templates can rely on it [SME: 6754]
* Sun Nov 21 2010 Ian Wells <esmith@wellsi.com> 2.2.0-4.sme
- SME 8.0 Changelog Cleanup [SME: 6368]
* Tue Oct 12 2010 Daniel Berteaud <daniel@firewall-services.com> 2.2.0-3.sme
- Support large drifts [SME: 5648]
* Tue Jun 8 2010 Jonathan Martens <smeserver-contribs@snetram.nl> 2.2.0-2.sme
- Do not allow pool.ntp.org as NTP server [SME: 5957]
* Tue Oct 7 2008 Shad L. Lords <slords@mail.com> 2.2.0-1.sme
- Roll new stream to separate sme7/sme8 trees [SME: 4633]
* Mon Jul 7 2008 Jonathan Martens <smeserver-contribs@snetram.nl> 1.16.0-17
- Remove <base> tags now in general [SME: 3923]
* Wed Feb 13 2008 Stephen Noble <support@dungog.net> 1.16.0-16
- Remove <base> tags now in general [SME: 3923]
* Sat Feb 09 2008 Gavin Weight <gweight@gmail.com> 1.16.0-15
- Remove the expand-template as set in previous patch, as we already
expand correct places. [SME: 3868]
* Fri Feb 8 2008 Filippo Carletti <filippo.carletti@gmail.com> 1.16.0-14
- Choose correct step-ticker for pool.ntp.org hosts. [SME: 3868]
* Fri Nov 30 2007 Gavin Weight <gweight@gmail.com> 1.16.0-13
- Fix use of uninitialized value in 30pool migrate. [SME: 3594]
* Sun Jul 08 2007 Stephen Noble <support@dungog.net> 1.16.0-12
- Migrate pool.ntp.org to smeserver.pool.ntp.org [SME: 1426]
* Sun Jul 08 2007 Stephen Noble <support@dungog.net> 1.16.0-11
- Change default to smeserver.pool.ntp.org [SME: 1426]
* Tue Jun 26 2007 Gavin Weight <gweight@gmail.com> 1.16.0-10
- Change Initial to First in the Datetime panel. [SME: 3108]
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com>
- Clean up spec so package can be built by koji/plague
* Mon Jan 22 2007 Shad L. Lords <slords@mail.com> 1.16.0-9
- Up memory limit to remove out of memory errors [SME: 2241]
* Tue Jan 16 2007 Shad L. Lords <slords@mail.com> 1.16.0-8
- Rework hwclock sync patch to function properly. [SME: 1954]
* Tue Jan 16 2007 Shad L. Lords <slords@mail.com> 1.16.0-7
- Remove HWClockSupport needs rework. [SME: 1954]
- Rework success patch needs delay before signal-event [SME: 2292]
* Sun Jan 14 2007 Shad L. Lords <slords@mail.com> 1.16.0-6
- Fix migrate fragment [SME: 1954]
* Sat Jan 13 2007 Shad L. Lords <slords@mail.com> 1.16.0-5
- Make success/failure messages standard [SME: 2292]
* Tue Jan 2 2007 Charlie Brady <charlie_brady@mitel.com> 1.16.0-4
- Add patch from Zac Sprackett to support sync to HW clock. [SME: 1954]
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com>
- Update to new release naming. No functional changes.
- Make Packager generic
* Sat Dec 02 2006 Shad L. Lords <slords@mail.com> 1.16.0-02
- Bump version so it gets installed on upgrade and forces ntp to be installed.
* Wed Mar 15 2006 Charlie Brady <charlie_brady@mitel.com> 1.16.0-01
- Roll stable stream version. [SME: 1016]
* Wed Nov 30 2005 Gordon Rowell <gordonr@gormand.com.au> 1.15.2-02
- Bump release number only
* Fri Oct 14 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.15.2-01]
- Remove L10Ns from base packages [SF: 1309520]
* Fri Oct 14 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.15.1-01]
- New dev stream before relocating L10Ns
* Fri Sep 30 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.15.0-14]
- Added Italian L10N - Thanks Filippo Carletti [SF: 1309266]
* Mon Sep 26 2005 Gordon Rowell <gordonr@e-smith.com>
- [1.15.0-13]
- Added German L10N - Thanks Dietmar Berteld [SF: 1293325]
* Wed Aug 31 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-12]
- Enforce minimum value of content of env/MEMLIMIT file. [SF: 1270649]
* Tue Aug 23 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-11]
- Fix update of /etc/localtime symlink after update via panel. [SF: 1264801]
* Wed Aug 17 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-10]
- Remove /etc/ntp.conf in %pre script, to work around
problems with update of ntpd RPM. Add conditional expand-template
to run script to be sure that file is regenerated before we need
it. [SF: 1237968]
* Fri Aug 12 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-09]
- Open config db r/w to allow property update. [SF: 1216546]
* Tue Jul 19 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-08]
- Update to current db access APIs. [SF: 1216546]
* Thu Jun 23 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-07]
- Increase MemLimit setting to 6MB (for CentOS4 build). [SF: 1225925]
- Remove obsolete "authenticate" directive from ntpd.conf. [SF: 1225925]
* Thu Jun 16 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-06]
- Ensure that 'status' property is recognised at startup. [MN00061795]
* Thu Mar 31 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-05]
- Add default fragment for MemLimit property of ntp service.
[MN00064130]
* Thu Mar 31 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-04]
- Remove explicity call of generic_template_expand - it's now
implicit. [MN00064130]
* Tue Mar 8 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-03]
- Fix template expansion of /etc/ntp/step-tickers and ./env/MEMLIMIT
[MN00064130]
- Use generic service adjust action for reload/restart. [MN00065576]
* Tue Jan 25 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-02]
- Combine set-date and set-clock, and use a shell script rather than
perl. [MN00064941]
- Use generic_template_expand action where possible, in place
of specific actions. Update e-smith-lib dependency. [MN00064130]
* Tue Jan 25 2005 Charlie Brady <charlieb@e-smith.com>
- [1.15.0-01]
- Changing version to development stream number - 1.15.0
* Thu Nov 11 2004 Michael Soulier <msoulier@e-smith.com>
- [1.14.0-02]
- Patched stderr "leaking" from ntpdate call. [msoulier MN00056927]
* Wed Nov 3 2004 Charlie Brady <charlieb@e-smith.com>
- [1.14.0-01]
- Changing version to stable stream number - 1.14.0
* Tue Oct 19 2004 Gordon Rowell <gordonr@e-smith.com>
- [1.13.0-21]
- pool.ntp.org now uses 0, 1, 2 prefixes rather than relying on
short DNS TTLs. So, we need to add the prefixes if we are talking
with pool.ntp.org or {region}.pool.ntp.org and revert to listing
"normal" NTP servers once [gordonr MN00053174]
* Mon Oct 18 2004 Gordon Rowell <gordonr@e-smith.com>
- [1.13.0-20]
- List the ntp server three times, for DNS round-robin servers,
such as pool.ntp.org, {region}.pool.ntp.org and time.nrc.ca
- [gordonr MN00053174]
* Tue Sep 28 2004 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-19]
- Convert ntp.conf/10localhost template fragment from DOS text format
[charlieb MN00050805]
* Tue Sep 28 2004 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-18]
- Convert ntp.conf/30other template fragment from DOS text format
[charlieb MN00050805]
- Don't create pid file, and remove one if we find an old one.
[charlieb MN00050806]
- ntpdate should log to standard output, not to syslog. [charlieb MN00049205]
* Tue Sep 28 2004 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-17]
- Need to create empty /service/ntpd/env directory for template to be
expanded into. [charlieb MN00050192]
* Tue Sep 28 2004 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-16]
- Increase memory limit for running ntpd. While we are at it,
we'll make the value templated, and update code in conf-ntpd
to modern standards. [charlieb MN00050192]
* Tue Sep 28 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-15]
- Fixed logging to go to stdout. [msoulier MN00049205]
* Fri Sep 3 2004 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-14]
- Clean BuildRequires. [charlieb MN00043055]
* Wed May 5 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-13]
- Fixed a logic error from last change. [msoulier MN00027900]
* Wed May 5 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-12]
- Added localhost as a stratum 10 server. [msoulier MN00027900]
* Wed Jan 28 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-11]
- Added ntpdate call to run script. [msoulier 10929]
* Thu Jan 22 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-10]
- Raised the softlimit for ntpd. libc is big. :) [msoulier 10929]
* Thu Jan 22 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-09]
- Moved proxy-start/stop to e-smith-proxy where they belong. [msoulier 10929]
* Thu Jan 22 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-08]
- Fixed missing directives to genfilelist. [msoulier 10586]
* Thu Jan 22 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-07]
- Fixed a typo in createlinks. The new ntpd initscript must not conflict with
the one in the ntpd package. [msoulier 10586]
* Wed Jan 21 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-06]
- Removing old symlink creation and moving to createlinks. [msoulier 10586]
* Wed Jan 21 2004 Michael Soulier <msoulier@e-smith.com>
- [1.13.0-05]
- Adding supervision of ntpd. [msoulier 10586]
* Fri Nov 7 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.13.0-04]
- Enable ntpd by default [gordonr 10566]
* Fri Nov 7 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.13.0-03]
- Default time server to pool.ntp.org [gordonr 10566]
* Tue Jul 22 2003 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-02]
- Remove deprecated -startup script, and add default db
fragments [charlieb 9553]
- s/Copyright/License/
* Tue Jul 8 2003 Charlie Brady <charlieb@e-smith.com>
- [1.13.0-01]
- Changing version to development stream number - 1.13.0
* Thu Jun 26 2003 Charlie Brady <charlieb@e-smith.com>
- [1.12.0-01]
- Changing version to stable stream number - 1.12.0
* Fri May 9 2003 Tony Clayton <apc@e-smith.com>
- [1.11.0-22]
- Fix save button justification [tonyc 1588]
* Tue May 6 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-21]
- Add Spanish lexicon for datetime panel [lijied 3793]
* Thu May 1 2003 Tony Clayton <apc@e-smith.com>
- [1.11.0-20]
- Background the timeserver-update event in panel [tonyc 1588]
* Wed Apr 30 2003 Tony Clayton <apc@e-smith.com>
- [1.11.0-19]
- Fix datetime panel when ntp stays disabled [tonyc 1588]
- Show date when ntp is enabled [tonyc 1588]
* Thu Apr 17 2003 Gordon Rowell <gordonr@e-smith.com>
- [1.11.0-18]
- Start ntp after external network is (possibly) up [gordonr 8391]
* Thu Apr 10 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-17]
- Change $q->table back [lijied 8034]
* Wed Apr 9 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-16]
- Added French trans for "Set Date and Time" [lijied 7949]
* Fri Apr 4 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-15]
- Changed $q->table to $->start_table where necessary [lijied 8034]
* Thu Apr 3 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-14]
- Removed en-us and fr 'Mitel Networks SME Server' branding [lijied 8016]
* Tue Apr 1 2003 Tony Clayton <apc@e-smith.com>
- [1.11.0-13]
- Fix datetime to loop back to Initial page w/ status report [tonyc 1588]
- Fix link to Verify page [tonyc 1588]
* Tue Apr 1 2003 Tony Clayton <apc@e-smith.com>
- [1.11.0-12]
- Add container table to fix IE 6 handling of table-layout: fixed [tonyc 1588]
- Remove redundant newlines from some print statements [tonyc 1588]
* Fri Mar 28 2003 Tony Clayton <apc@e-smith.com>
- [1.11.0-11]
- Update fr l10n strings [tonyc 1588]
* Thu Mar 27 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-10]
- Major refactoring and cleanup of datetime.pm [tonyc 1588]
- Expand tabs to spaces in datetime.pm [tonyc 1588]
- Add radio buttons and don't allow setting date manually when ntp is enabled
[tonyc 1588]
- Modified French lexicon to use lang="fr", rename the lexicon
directory to fr [lijied 6787]
* Mon Mar 17 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-09]
- Deleted inappropriate template-begin file
deleted empty template-end files [lijied 3295]
* Thu Mar 6 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-08]
- Modified datetime panel order [lijied 7356]
* Tue Mar 4 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-07]
- Split en-us lexicon from datetime panel [lijied 4030]
* Mon Mar 3 2003 Lijie Deng <lijied@e-smith.com>
- [1.11.0-06]
- Add French lexicon for datetime [lijied 5003]
* Thu Jan 16 2003 Mark Knox <markk@e-smith.com>
- [1.11.0-05]
- Use new gen_locale_date_string routine [markk 3357]
* Fri Dec 27 2002 Mike Dickson <miked@e-smith.com>
- [1.11.0-04]
- updated the datetime panel to use css [miked 5494]
* Tue Dec 10 2002 Mike Dickson <miked@e-smith.com>
- [1.11.0-03]
- ui update [miked 5494]
* Thu Nov 21 2002 Mike Dickson <miked@e-smith.com>
- [1.11.0-02]
- update to new UI system [miked 5494]
* Wed Nov 20 2002 Mike Dickson <miked@e-smith.com>
- [1.11.0-01]
- Changing to development stream; version upped to 1.11.0
* Fri Oct 11 2002 Charlie Brady <charlieb@e-smith.com>
- [1.10.0-01]
- Rolling stable version number to 1.10.0
* Fri Aug 23 2002 Mark Knox <markk@e-smith.com>
- [1.9.4-01]
- Fixed duplicate English-only footers in panel [markk 3615]
* Mon Aug 19 2002 Charlie Brady <charlieb@e-smith.com>
- [1.9.3-01]
- Remove masq script update and restart symlinks. They are no longer
needed not that we have connection tracking enabled. [charlieb 4501]
- Add rc7.d symlink, and don't set obsolete InitscriptsOrder property
[charlieb 4458]
* Thu Aug 8 2002 Charlie Brady <charlieb@e-smith.com>
- [1.9.2-01]
- Remove NTP masq template fragment. We no longer need it, as netfilter
connection tracking allows NTP replies. [charlieb 4499]
* Wed Jul 17 2002 Charlie Brady <charlieb@e-smith.com>
- [1.9.1-01]
- Change masq script fragment to use iptables. [charlieb 1268]
* Wed Jun 5 2002 Charlie Brady <charlieb@e-smith.com>
- [1.9.0-01]
- Changing version to development stream number - 1.9.0
* Fri May 31 2002 Charlie Brady <charlieb@e-smith.com>
- [1.8.0-01]
- Changing version to maintained stream number to 1.8.0
* Thu May 23 2002 Gordon Rowell <gordonr@e-smith.com>
- [1.7.5-01]
- RPM rebuild forced by cvsroot2rpm
* Wed May 8 2002 Mark Knox <markk@e-smith.com>
- [1.7.4-01]
- Subst <base> -> </base> in lexicon [markk 3309]
* Tue May 7 2002 Gordon Rowell <gordonr@e-smith.com>
- [1.7.3-01]
- Localised "Network Time Server" heading [markk 3311]
- Localised date display [markk 3311]
- Added nav bar entry [gordonr 3155]
* Mon Apr 15 2002 Mark Knox <markk@e-smith.com>
- [1.7.2-01]
- Moved all code into module datetime.pm [markk 3159]
- Converted to FormMagick panel and internationalized [markk 3159]
- Added POD and testsuite [markk 3159]
* Fri Apr 5 2002 Kirrily Robert <skud@e-smith.com>
- [1.7.1-01]
- Testing CVS import
* Fri Apr 5 2002 Kirrily Robert <skud@e-smith.com>
- [1.7.0-01]
- rollRPM: Rolled version number to 1.7.0-01. Includes patches up to 1.6.0-01.
* Tue Dec 11 2001 Jason Miller <jay@e-smith.com>
- [1.6.0-01]
- rollRPM: Rolled version number to 1.6.0-01. Includes patches up to 1.5.0-02.
* Tue Nov 06 2001 Charlie Brady <charlieb@e-smith.com>
- [1.5.0-02]
- Initialise TimeZone db setting from /etc/sysconfig/clock if not set
- Branding changes in web panel.
* Tue Nov 6 2001 Charlie Brady <charlieb@e-smith.com>
- [1.5.0-01]
- Rolled version number to 1.5.0-01. Includes patches upto 1.4.0-03.
* Tue Aug 28 2001 Gordon Rowell <gordonr@e-smith.com>
- [1.4.0-03]
- Removed deprecated post-restore event directory
* Fri Aug 17 2001 gordonr
- [1.4.0-02]
- Autorebuild by rebuildRPM
* Wed Aug 8 2001 Charlie Brady <charlieb@e-smith.com>
- [1.4.0-01]
- Rolled version number to 1.4.0-01. Includes patches upto 1.3.0-06.
* Thu Aug 02 2001 Gordon Rowell <gordonr@e-smith.com>
- [1.3.0-06]
- More branding changes
* Sun Jul 29 2001 Jason Miller <jmiller@e-smith.com>
- [1.3.0-05]
- Branding text changes to the datetime web panel
* Tue Jul 17 2001 Jason Miller <jmiller@e-smith.com>
- [1.3.0-04]
- Patch to datetime panel to fix mismatched section headers
* Tue May 29 2001 Tony Clayton <tonyc@e-smith.com>
- [1.3.0-03]
- fixed actions that had tied %conf when calling serviceControl (4 actions)
* Wed Apr 11 2001 Adrian Chung <adrianc@e-smith.com>
- [1.3.0-02]
- changing h4 tags to paragraph bold tags.
* Wed Apr 11 2001 Adrian Chung <mac@e-smith.com>
- [1.3.0-01]
- Rolled version number to 1.3.0-01. Includes patches upto 1.2.0-13.
* Fri Feb 23 2001 Paul Nesbit <pkn@e-smith.com>
- [1.2.0-13]
- Fixed conf-timezone to properly handle timezone after restore
* Mon Feb 12 2001 Adrian Chung <adrianc@e-smith.com>
- Roll release number for GPG signing.
* Mon Feb 12 2001 Charlie Brady <charlieb@e-smith.com>
- [1.2.0-12]
- Expand ntp.conf always, even when ntpd is disabled. Otherwise ntpd
refuses to shut down.
* Fri Feb 9 2001 Adrian Chung <adrianc@e-smith.com>
- Added restart-crond to timezone-update event.
* Thu Feb 8 2001 Adrian Chung <adrianc@e-smith.com>
- Rolling release number for GPG signing.
* Wed Feb 07 2001 Charlie Brady <charlieb@e-smith.com>
- [1.2.0-08]
- Add some missing event symlinks
* Sun Feb 04 2001 Gordon Rowell <gordonr@e-smith.com>
- [1.2.0-07]
- Loop through all addresses in case NTPServer refers to multiple IPs
* Fri Feb 02 2001 Gordon Rowell <gordonr@e-smith.com>
- [1.2.0-06]
- Build ip masq rule with IP address of NTP server
* Tue Jan 30 2001 Jason Miller <jmiller@e-smith.com>
- [1.2.0-05]
- Updated datetime panel to run the timeserver-update
event (added rules to make sure that updates to the
configuration database aren't affected UnsavedChanges flag).
* Tue Jan 30 2001 Jason Miller <jmiller@e-smith.com>
- [1.2.0-04]
- Added a comment in the ipchains rules
- Added symlinks for the conf-masq and restart-masq actions
to be run as part of timeserver-update event (thereby
expanding the /etc/rc.d/init.d/masq template).
* Sat Jan 27 2001 Charlie Brady <charlieb@e-smith.com>
- [1.2.0-03]
- Change ref to %conf => %services in masq template fragment
* Thu Jan 25 2001 Peter Samuel <peters@e-smith.com>
- [1.2.0-02]
- Fix perl syntax error in masq template fragment
- Save/restore unsavedchanges flag around timezone change.
* Thu Jan 25 2001 Peter Samuel <peters@e-smith.com>
- [1.2.0-01]
- Rolled version number to 1.2.0-01. Includes patches upto 1.1.0-28.
* Wed Jan 24 2001 Charlie Brady <charlieb@e-smith.com>
- [1.1.0-28]
- Remove restart-ntp from post-upgrade action
- Remove post-restore event
- Tighten up NTP packet filter rule.
- Remove conf-ntpd from ip-change event
- Remove duplication of timezone migration code - it is in base as well.
* Wed Jan 24 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-27]
- Changed conf-timezone action so that during an upgrade
it will preserve the existing symlink for /etc/localtime
and use that value to set the configuration database
value for TimeZone
* Wed Jan 24 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-26]
- removed the signal event for datetime-set in the datetime
web panel
* Wed Jan 24 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-25]
- combined the timezone-update and datetime-set events
into a single event (and might combine the action scripts
as well)
* Wed Jan 24 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-24]
- added new service control mechanism to not background
the proxy-stop action to shutdown squid
* Tue Jan 23 2001 Jason Miller <jmiller@e-smith.com>
- moved all date and time settings into a new event/action
sequence (datetime-set) which then calls the proxy-stop,
set-date, set-clock, proxy-start and removed the previous
system calls from the web manager form
- removed the squid stop/start actions from conf-timezone
action
* Mon Jan 22 2001 Jason Miller <jmiller@e-smith.com>
- Updated createlinks to have update-timezone and
update-timeserver events link in the action restart-syslog
to improve on the strange log times recorded otherwise
* Mon Jan 22 2001 Jason Miller <jmiller@e-smith.com>
- Added service control to stop the proxy server (squid)
from running prior to changing the timezone information
in conf-timezone, then starting it again after the change
to remove squid hangups on shutdown
* Mon Jan 22 2001 Gordon Rowell <gordonr@e-smith.com>
- Added NTP fragment to packet filter - Thanks Bernd Leibing
* Tue Jan 16 2001 Jason Miller <jmiller@e-smith.com>
- Removed the %postun section which was deleting ntpd
configuration values after uninstalling e-smith-ntp
(which occurs in an upgrade) and the %post section
which expanded the templates for ntpd without checking
the status (now done properly in the actions)
* Tue Jan 16 2001 Jason Miller <jmiller@e-smith.com>
- Fixed the /etc/ntp.conf template expansion to pull
the NTPServer value from the ntpd service configuration
settings
* Tue Jan 16 2001 Jason Miller <jmiller@e-smith.com>
- Changed the order of system time setting:
- Set timezone first, then clock settings
* Fri Jan 12 2001 Jason Miller <jmiller@e-smith.com>
- Merged the conf-clock and reset-link into a single
action script of conf-timezone
- Removed symlinks to post-upgrade and update-timezone
- Added symlink for conf-timezone to update-timezone
- Added symlink for conf-timezone to bootstrap-console-save
(instead of post-upgrade)
* Fri Jan 12 2001 Jason Miller <jmiller@e-smith.com>
- Added reset-link and conf-clock to the post-upgrade
event
* Fri Jan 12 2001 Gordon Rowell <gordonr@e-smith.com>
- Added conf-ntpd-startup
* Thu Jan 11 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-13]
- remove extra signal events based on what time setting
choice gets made
* Thu Jan 11 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-12]
- updated datetime panel to take into account the new
action scripts called by timezone-update event
* Thu Jan 11 2001 Gordon Rowell <gordonr@e-smith.com>
- [1.1.0-11]
- use serviceControl()
* Thu Jan 11 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-10]
- fixed /etc/sysconfig/clock template generation
* Thu Jan 11 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-9]
- added conf-clock to configure /etc/sysconfig/clock
- added reset-link to unlink and re-symlink
/etc/localtime to the correct timezone
* Sat Jan 6 2001 Jason Miller <jmiller@e-smith.com>
- [1.1.0-7]
- Charlie changed spec file in %post and %postun to
generate ntpd templates in runlevel 7 and to remove
it if e-smith-ntp is uninstalled
- Added configuration parameter for timeZone which
will be used by default as the timezone value for
date and time, otherwise it defaults to /etc/localtime
* Fri Jan 5 2001 Adrian Chung <adrianc@e-smith.com>
- [1.1.0-6]
- add new event timezone-update that calls restart httpd
- datetime panel modified to call both time{server,zone}-update
* Fri Jan 5 2001 Charlie Brady <charlieb@e-smith.com>
- [1.1.0-5]
- Disable ntpd by default - without an NTPServer setting there's no
point in enabling ntpd.
- Remove timeserver web form. Add Jay's new combined datetime and
timeserver form.
* Fri Dec 15 2000 Adrian Chung <adrianc@e-smith.com>
- Changed NTPserver to NTPServer in 00timeServer fragment
- Modified timeserver panel to record timeserver value to ntpd
property instead of legacy variable.
* Wed Dec 6 2000 Adrian Chung <adrianc@e-smith.com>
- Removed 'private' property setting in conf-ntpd
- Added link for conf-ntpd to post-install
* Wed Dec 6 2000 Adrian Chung <adrianc@e-smith.com>
- Re-rolled tar ball to get rid of symlinks
* Mon Dec 4 2000 Adrian Chung <adrianc@e-smith.com>
- Initial release
%description
Configuration files and templates for the NTP daemon.
%prep
%setup
/usr/bin/rm -rf root/var/service/ntpd/
mkdir -p root/usr/lib/systemd/system/ntpd.service.d
%build
for i in ip-change post-install post-upgrade timeserver-update \
timezone-update bootstrap-console-save
do
mkdir -p root/etc/e-smith/events/$i
done
perl createlinks
/sbin/e-smith/buildtests 30e-smith-datetime
# Manage supervise and multilog.
#mkdir -p root/service
#ln -s ../var/service/ntpd root/service/ntpd
#mkdir -p root/var/service/ntpd/supervise
#mkdir -p root/var/service/ntpd/env
#touch root/var/service/ntpd/down
#mkdir -p root/var/service/ntpd/log/supervise
#mkdir -p root/var/log/ntpd
%install
rm -rf $RPM_BUILD_ROOT
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
/sbin/e-smith/genfilelist \
--file '/sbin/e-smith/systemd/initializedate' 'attr(0554,root,root)' \
$RPM_BUILD_ROOT > %{name}-%{version}-filelist
# --dir '/var/service/ntpd' 'attr(1755,root,root)' \
# --file '/var/service/ntpd/down' 'attr(0644,root,root)' \
# --file '/var/service/ntpd/run' 'attr(0755,root,root)' \
# --dir '/var/service/ntpd/supervise' 'attr(0700,root,root)' \
# --dir '/var/service/ntpd/env' '%attr(0755,root,root)' \
# --file '/var/service/ntpd/env/MEMLIMIT' 'attr(0644,root,root)' \
# --dir '/var/service/ntpd/log' 'attr(1755,root,root)' \
# --file '/var/service/ntpd/log/run' 'attr(0755,root,root)' \
# --dir '/var/log/ntpd' 'attr(2750,smelog,nofiles)' \
# $RPM_BUILD_ROOT > %{name}-%{version}-filelist
echo "%doc COPYING" >> %{name}-%{version}-filelist
%clean
rm -rf $RPM_BUILD_ROOT
%pre
rm -f /etc/ntp.conf
%preun
%post
%postun
%files -f %{name}-%{version}-filelist
%defattr(-,root,root)

View File

@ -0,0 +1 @@
smeserver.pool.ntp.org

View File

@ -0,0 +1 @@
enabled

View File

@ -0,0 +1 @@
service

View File

@ -0,0 +1,7 @@
{
my $ntpd = $DB->get('ntpd');
return unless $ntpd;
return if $ntpd->prop('SyncToHWClockSupported');
$ntpd->set_prop('status', 'enabled') unless ($ntpd->prop('status') || 'disabled') eq 'enabled';
}

View File

@ -0,0 +1,8 @@
{
my $pool = $DB->get_prop('ntpd', 'NTPServer');
return unless defined $pool;
if ($pool eq 'pool.ntp.org')
{
$DB->set_prop('ntpd', 'NTPServer', 'smeserver.pool.ntp.org')
}
}

View File

@ -0,0 +1,66 @@
#!/usr/bin/perl -w
#----------------------------------------------------------------------
# copyright (C) 2001-2005 Mitel Networks Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
#----------------------------------------------------------------------
package esmith;
use strict;
use Errno;
use esmith::ConfigDB;
use esmith::templates;
my $db = esmith::ConfigDB->open or die "Could not open config db";
# Obtain the TimeZone configuration database value
my $timezone = $db->get("TimeZone");
if (defined $timezone)
{
$timezone = $timezone->value;
}
else
{
# Initialise timezone from /etc/sysconfig/clock if not already set
if (open(CLOCK, "/etc/sysconfig/clock"))
{
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 ...
$timezone = "US/Eastern" unless defined $timezone;
$db->new_record('TimeZone')->set_value($timezone);
}
# Undo the previous symlink and remake it to the correct time zone
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);

View File

@ -0,0 +1,4 @@
#!/bin/sh
/bin/date "$2"
/sbin/clock -u -w

View File

@ -0,0 +1,239 @@
<lexicon lang="en-us">
<entry>
<base>FORM_TITLE</base>
<trans>Date and time configuration</trans>
</entry>
<entry>
<base>INITIAL_DESC</base>
<trans>
This is where you configure the date and time of this server. You may use an existing network time server or
manually set the date and time for your time zone.
</trans>
</entry>
<entry>
<base>SET_DATE_TITLE</base>
<trans>Set Date and Time</trans>
</entry>
<entry>
<base>COULD_NOT_OPEN_TZ_FILE</base>
<trans>Error: Could not open timezone file for reading: </trans>
</entry>
<entry>
<base>JANUARY</base>
<trans>January</trans>
</entry>
<entry>
<base>FEBRUARY</base>
<trans>February</trans>
</entry>
<entry>
<base>MARCH</base>
<trans>March</trans>
</entry>
<entry>
<base>APRIL</base>
<trans>April</trans>
</entry>
<entry>
<base>MAY</base>
<trans>May</trans>
</entry>
<entry>
<base>JUNE</base>
<trans>June</trans>
</entry>
<entry>
<base>JULY</base>
<trans>July</trans>
</entry>
<entry>
<base>AUGUST</base>
<trans>August</trans>
</entry>
<entry>
<base>SEPTEMBER</base>
<trans>September</trans>
</entry>
<entry>
<base>OCTOBER</base>
<trans>October</trans>
</entry>
<entry>
<base>NOVEMBER</base>
<trans>November</trans>
</entry>
<entry>
<base>DECEMBER</base>
<trans>December</trans>
</entry>
<entry>
<base>NEW_M/D/Y</base>
<trans>New month/day/year:</trans>
</entry>
<entry>
<base>NEW_H/M/S</base>
<trans>New hour/min/sec:</trans>
</entry>
<entry>
<base>AM/PM_AND_TZ</base>
<trans>AM/PM and time zone:</trans>
</entry>
<entry>
<base>NTP_ENABLE_DESC</base>
<trans>
The server can periodically synchronize the system clock to a network time protocol (NTP) server. If you select this option, enter the hostname or IP address of the NTP server below.
</trans>
</entry>
<entry>
<base>NTP_CONFIGURE_DESC</base>
<trans>
The server is periodically synchronizing the system clock to the network time protocol (NTP) server specified below. To synchronize to a different NTP server, enter a different hostname or IP address in the field below.
</trans>
</entry>
<entry>
<base>NTP_DISABLE_DESC</base>
<trans>
Choose this option to stop syncronizing the system clock to the NTP
server. When the NTP service is disabled, you can set the system date
and time manually from this page.
</trans>
</entry>
<entry>
<base>NTP_SERVER</base>
<trans>NTP Server</trans>
</entry>
<entry>
<base>VERIFY_DATE_AND_TIME</base>
<trans>Verify date and time</trans>
</entry>
<entry>
<base>NEW_DATE_AND_TIME</base>
<trans>New date and time setting:</trans>
</entry>
<entry>
<base>SETTING_DATE_AND_TIME</base>
<trans>Setting date and time</trans>
</entry>
<entry>
<base>INVALID_DAY</base>
<trans>Error: invalid day of month: </trans>
</entry>
<entry>
<base>BETWEEN_1_AND_31</base>
<trans>Please choose a day between 1 and 31.</trans>
</entry>
<entry>
<base>INVALID_YEAR</base>
<trans>Error: invalid year: </trans>
</entry>
<entry>
<base>FOUR_DIGIT_YEAR</base>
<trans>Please choose a four-digit year between 1900 and 2200.</trans>
</entry>
<entry>
<base>INVALID_HOUR</base>
<trans>Error: invalid hour: </trans>
</entry>
<entry>
<base>BETWEEN_1_AND_12</base>
<trans>Please choose an hour between 1 and 12.</trans>
</entry>
<entry>
<base>INVALID_MINUTE</base>
<trans>Error: invalid minute: </trans>
</entry>
<entry>
<base>BETWEEN_0_AND_59</base>
<trans>Please choose a minute between 0 and 59.</trans>
</entry>
<entry>
<base>INVALID_SECOND</base>
<trans>Error: invalid second</trans>
</entry>
<entry>
<base>INVALID_MONTH</base>
<trans>Error: invalid month</trans>
</entry>
<entry>
<base>MONTH_BETWEEN_1_AND_12</base>
<trans>Please choose a month value between 1 and 12.</trans>
</entry>
<entry>
<base>UPDATING_CLOCK</base>
<trans>
<![CDATA[
System clock is being updated. Please wait for a few seconds,
then click <A HREF="datetime?page=1&wherenext=Verify" TARGET="main">here</A>
to verify changes.
]]>
</trans>
</entry>
<entry>
<base>ERR_SETTING_CLOCK</base>
<trans>Error occurred while setting system time and hardware clock.</trans>
</entry>
<entry>
<base>SERVER_DISABLED</base>
<trans>Network time server disabled successfully</trans>
</entry>
<entry>
<base>SERVER_DISABLED_DESC</base>
<trans>
<![CDATA[
You have disabled this service: The server will rely on its internal
clock, and <b>will not</b> try to synchronize from a time server.
]]>
</trans>
</entry>
<entry>
<base>ERR_CHANGING_TS</base>
<trans>Error while changing network time server setting</trans>
</entry>
<entry>
<base>INVALID_NTP_ADDR</base>
<trans>Invalid NTP server address: </trans>
</entry>
<entry>
<base>SETTINGS_CHANGED</base>
<trans>Network time server setting changed successfully</trans>
</entry>
<entry>
<base>SYNC_WITH</base>
<trans>This server is now configured to synchronize periodically
(via the Internet) with:
</trans>
</entry>
<entry>
<base>INVALID_NTP_SERVER</base>
<trans>
<![CDATA[
Invalid NTP server, the server <b>will not</b> try to synchronize
from a time server.
]]>
</trans>
</entry>
<entry>
<base>NETWORK_TIME_SERVER</base>
<trans>Network Time Server</trans>
</entry>
<entry>
<base>NTP_CONFIGURE_TITLE</base>
<trans>Configure Network Time Server</trans>
</entry>
<entry>
<base>NTP_ENABLE_TITLE</base>
<trans>Enable Network Time Server</trans>
</entry>
<entry>
<base>NTP_DISABLE_TITLE</base>
<trans>Disable Network Time Server</trans>
</entry>
<entry>
<base>CURRENT_SETTING</base>
<trans>Current setting</trans>
</entry>
<entry>
<base>Date and time</base>
<trans>Date and time</trans>
</entry>
</lexicon>

View File

@ -0,0 +1,8 @@
/var/log/ntp.log \{
missingok
weekly
rotate 24
compress
notifempty
copytruncate
\}

View File

@ -0,0 +1,19 @@
{
# vim: ft=perl:
my $server = $ntpd{NTPServer} || '';
return "# sync to hw clock" if $server =~ 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";
}
}

View File

@ -0,0 +1,9 @@
{
$OUT = '';
unless ( ($ntpd{'SupportLargeDrift'} || 'disabled') eq 'enabled' ){
$OUT .= <<EOF;
server 127.127.1.0 # local clock
fudge 127.127.1.0 stratum 10
EOF
}
}

View File

@ -0,0 +1,3 @@
{
$OUT = "driftfile /var/lib/ntp/drift";
}

View File

@ -0,0 +1,2 @@
restrict default noquery

View File

@ -0,0 +1 @@
restrict 127.0.0.1

View File

@ -0,0 +1,19 @@
{
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

@ -0,0 +1,4 @@
#ntp
:programname, isequal, "ntpd" /var/log/ntp.log
& stop

View File

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

View File

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

View File

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

View File

@ -0,0 +1,4 @@
# nut ntpd specific subservices
# this would conflict with ntpd
disable ntpdate.service

View File

@ -0,0 +1,20 @@
[Service]
{
# memory limit to catch any memory leak before it kills the system
use constant MIN_MEMORY_LIMIT => 35000000;
# If there is a memory limit in the database and it is below the minimum, delete it.
if (defined $ntpd{MemLimit} && $ntpd{MemLimit} < MIN_MEMORY_LIMIT)
{
$DB->get_prop_and_delete('ntpd','MemLimit');
delete $ntpd{MemLimit};
}
$OUT .= "MemoryLimit=";
$OUT .= $ntpd{MemLimit} || MIN_MEMORY_LIMIT;
$OUT .= "\n";
}
ExecStartPre=-/sbin/e-smith/expand-template /etc/ntp.conf
ExecStartPre=-/sbin/e-smith/systemd/initializedate
Restart=always

View File

@ -0,0 +1,2 @@
[Install]
WantedBy=sme-server.target

View File

@ -0,0 +1,47 @@
#!/usr/bin/perl -wT
#----------------------------------------------------------------------
# heading : Configuration
# description : Date and time
# navigation : 6000 6100
#
# Copyright (c) 2001 Mitel Networks Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Technical support for this program is available from e-smith, inc.
# Please visit our web site www.e-smith.com for details.
#----------------------------------------------------------------------
use strict;
use esmith::FormMagick::Panel::datetime;
my $panel = esmith::FormMagick::Panel::datetime->new();
$|=1;
$panel->display();
__DATA__
<form title="FORM_TITLE" header="/etc/e-smith/web/common/head.tmpl"
footer="/etc/e-smith/web/common/foot.tmpl">
<page name="First" pre-event="print_status_message()"
post-event="performAndShowResult()">
<description>INITIAL_DESC</description>
<subroutine src="showInitial()"/>
</page>
<page name="Verify" pre-event="turn_off_buttons">
<title>VERIFY_DATE_AND_TIME</title>
<subroutine src="verifyResult()"/>
</page>
</form>

View File

@ -0,0 +1,25 @@
#!/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
# set hardware clock to the current time
/usr/sbin/hwclock --systohc
exit 0

0
root/usr/lib/perl5/.gitignore vendored Normal file
View File

View File

View File

@ -0,0 +1,774 @@
#!/usr/bin/perl -wT
#
# Copyright (C) 2002 Mitel Networks Corporation
#
# Technical support for this program is available from e-smith, inc.
# Please call us at (613) 236-0743 or visit our web site www.e-smith.net
# for details.
#
# $Id: datetime.pm,v 1.13 2003/04/04 19:24:58 lijied Exp $
#
#----------------------------------------------------------------------
package esmith::FormMagick::Panel::datetime;
use strict;
use Exporter;
use esmith::ConfigDB;
use esmith::FormMagick;
use esmith::cgi;
use esmith::TestUtils;
our @ISA = qw(esmith::FormMagick Exporter);
our @EXPORT = qw(
showInitial performAndShowResult verifyResult flushOn
);
our $VERSION = sprintf '%d.%03d', q$Revision: 1.13 $ =~ /: (\d+).(\d+)/;
=pod
=head1 NAME
esmith::FormMagick::Panel::datetime - useful panel functions
=head1 SYNOPSIS
use esmith::FormMagick::Panel::datetime;
my $panel = esmith::FormMagick::Panel::datetime->new();
$panel->display();
=head1 DESCRIPTION
=head2 new
Exactly as for esmith::FormMagick
=begin testing
use_ok('esmith::FormMagick::Panel::datetime');
$FM = esmith::FormMagick::Panel::datetime->new();
isa_ok($FM, 'esmith::FormMagick::Panel::datetime');
$FM->{cgi} = CGI->new;
=end testing
=cut
sub new
{
shift;
my $self = esmith::FormMagick->new();
$self->{calling_package} = (caller)[0];
bless $self;
return $self;
}
=pod
=head2 showInitial
Display the contents of the initial page
=begin testing
is($FM->showInitial(), '', 'showInitial');
like($_STDOUT_, qr/NEW_M\/D\/Y/, ' .. new m/d/y field');
like($_STDOUT_, qr/NEW_H\/M\/S/, ' .. new h/m/s field');
like($_STDOUT_, qr/SAVE_DATE_TIME/, ' .. save date/time button');
like($_STDOUT_, qr/ENABLE_NTP/, ' .. enable NTP box');
like($_STDOUT_, qr/SAVE_NTP/, ' .. save NTP button');
=end testing
=cut
sub showInitial
{
my $self = shift;
my $q = $self->{cgi};
#--------------------------------------------------
# Get a sorted list of time zones
#--------------------------------------------------
$ENV{BASH_ENV} = '';
if (! open (ZONES, "cd /usr/share/zoneinfo; /usr/bin/find . -type f -or -type l | /bin/grep '^./[A-Z]' |"))
{
print $q->h3 ($self->localise('COULD_NOT_OPEN_TZ_FILE').$!.'.');
return;
}
my $zone;
my @zones = ();
while (defined ($zone = <ZONES>))
{
chop ($zone);
$zone =~ s/^.\///;
push @zones, $zone;
}
close ZONES;
@zones = sort @zones;
#--------------------------------------------------
# Read the time
#--------------------------------------------------
my ($weekdaydefault,
$monthnamedefault,
$monthdefault,
$daydefault,
$yeardefault,
$hourdefault,
$minutedefault,
$seconddefault,
$ampmdefault) = split /\|/,
`/bin/date '+%A|%B|%-m|%-d|%Y|%-I|%M|%S|%p'`;
# get rid of trailing carriage return on last field
chop ($ampmdefault);
#--------------------------------------------------
# Figure out time zone by looking first looking at
# the configuration database value of TimeZone.
# If that is not defined, try and get it from /etc/localtime.
# If that doesn't work, default to US/Eastern.
#--------------------------------------------------
my $localtime;
my $timezonedefault = "US/Eastern";
my $conf = esmith::ConfigDB->open();
if (defined $conf->get('TimeZone'))
{
$timezonedefault = $conf->get('TimeZone')->value;
}
else
{
if (defined ($localtime = readlink '/etc/localtime'))
{
my $pos = index $localtime, 'zoneinfo/';
if ($pos > -1)
{
$timezonedefault = substr $localtime, ($pos + 9);
}
}
}
my $now_string = $self->gen_locale_date_string();
my $oldNTPServer = '';
$conf = esmith::ConfigDB->open();
my $rec = $conf->get('ntpd');
if ($rec)
{
$oldNTPServer = $rec->prop('NTPServer') || '';
}
my $ntpEnabled = 0;
if ($rec and $rec->prop('status') eq "enabled")
{
$ntpEnabled = 1 unless ($rec->prop('SyncToHWClockSupported') || 'yes') eq 'yes' and $oldNTPServer =~ m#^\s*$#;
}
#--------------------------------------------------
# Display the time setting form
#--------------------------------------------------
my %monthlabels = ('1' => $self->localise('JANUARY'),
'2' => $self->localise('FEBRUARY'),
'3' => $self->localise('MARCH'),
'4' => $self->localise('APRIL'),
'5' => $self->localise('MAY'),
'6' => $self->localise('JUNE'),
'7' => $self->localise('JULY'),
'8' => $self->localise('AUGUST'),
'9' => $self->localise('SEPTEMBER'),
'10' => $self->localise('OCTOBER'),
'11' => $self->localise('NOVEMBER'),
'12' => $self->localise('DECEMBER'));
# create radio buttons in the same group
my ($rbDisableNTP, $rbEnableNTP) =
$q->radio_group(-name => 'ntpStatus',
-values => ['disabled', 'enabled'],
-default => $ntpEnabled ? 'enabled' : 'disabled',
-linebreak => 'true',
-labels => {enabled => '', disabled => ''});
print "<tr><td colspan=2><table>\n";
if (! $ntpEnabled)
{
print $q->Tr(
$q->td({-class => "sme-radiobutton"}, $rbDisableNTP),
$q->td($q->h3($self->localise('SET_DATE_TITLE')))),
$q->Tr(
$q->td({-class => "sme-radiobutton"}, "&nbsp;"),
$q->td(
$q->p ($self->localise('CURRENT_SETTING').": ",
$q->b ($now_string)))),
$q->Tr(
$q->td({-class => "sme-radiobutton"}, "&nbsp;"),
$q->td(
$q->table({-class => "sme-noborders"},
$q->Tr (esmith::cgi::genCell ($q,
$self->localise('NEW_M/D/Y'), "sme-noborders-label"),
esmith::cgi::genCell ($q,
$q->popup_menu (-name => 'month', -values => [ 1..12 ],
-default => $monthdefault, -labels => \%monthlabels),
"sme-noborders-content"),
esmith::cgi::genCell ($q,
$q->textfield (-name => 'day', -override => 1,
-default => $daydefault, -size => 12),
"sme-noborders-content"),
esmith::cgi::genCell ($q,
$q->textfield (-name => 'year', -override => 1,
-default => $yeardefault, -size => 12),
"sme-noborders-content")),
$q->Tr (esmith::cgi::genCell ($q,
$self->localise('NEW_H/M/S'), "sme-noborders-label"),
esmith::cgi::genCell ($q,
$q->textfield (-name => 'hour', -override => 1,
-default => $hourdefault, -size => 12),
"sme-noborders-content"),
esmith::cgi::genCell ($q,
$q->textfield (-name => 'minute', -override => 1,
-default => $minutedefault, -size => 12),
"sme-noborders-content"),
esmith::cgi::genCell ($q,
$q->textfield (-name => 'second', -override => 1,
-default => $seconddefault, -size => 12),
"sme-noborders-content")),
$q->Tr (esmith::cgi::genCell ($q,
$self->localise('AM/PM_AND_TZ'), "sme-noborders-label"),
esmith::cgi::genCell ($q,
$q->popup_menu (-name => 'ampm', -values => ['AM', 'PM'],
-default => $ampmdefault),
"sme-noborders-content"),
esmith::cgi::genDoubleCell ($q,
$q->popup_menu (-name => 'timezone', -values => \@zones,
-default => $timezonedefault))),
)
)
),"\n";
}
#--------------------------------------------------
# Display the NTP form
#--------------------------------------------------
my $ntpEnabledTitle;
my $ntpEnabledDesc;
my $showTime;
if ($ntpEnabled)
{
$ntpEnabledTitle = $self->localise('NTP_CONFIGURE_TITLE');
$ntpEnabledDesc = $self->localise('NTP_CONFIGURE_DESC');
$showTime = $q->p ($self->localise('CURRENT_SETTING').": ",
$q->b ($now_string));
}
else
{
$ntpEnabledTitle = $self->localise('NTP_ENABLE_TITLE');
$ntpEnabledDesc = $self->localise('NTP_ENABLE_DESC');
}
print $q->Tr(
$q->td({-class => "sme-radiobutton"}, $rbEnableNTP),
$q->td($q->h3($ntpEnabledTitle))),
$q->Tr(
$q->td({-class => "sme-radiobutton"}, "&nbsp;"),
$q->td($ntpEnabledDesc)),
$q->Tr(
$q->td({-class => "sme-radiobutton"}, "&nbsp;"),
$q->td($showTime)),
$q->Tr(
$q->td({-class => "sme-radiobutton"}, "&nbsp;"),
$q->td(
$q->table ({-class => "sme-noborders"},
$q->Tr (esmith::cgi::genCell ($q,
$self->localise('NTP_SERVER'), "sme-noborders-label"),
esmith::cgi::genCell ($q,
$q->textfield(-name => 'ntpServer', -size => '32',
-default => "$oldNTPServer"),
"sme-noborders-content")),
)
)
),"\n";
if ($ntpEnabled)
{
print $q->Tr(
$q->td({-class => "sme-radiobutton"}, $rbDisableNTP),
$q->td($q->h3 ($self->localise("NTP_DISABLE_TITLE")))),
$q->Tr(
$q->td({-class => "sme-radiobutton"}, "&nbsp;"),
$q->td($self->localise('NTP_DISABLE_DESC'))),"\n";
}
print $q->Tr(
$q->td({-colspan => 2},
$q->table ({-class => "sme-noborders", -width=>'100%'},
$q->Tr(
$q->th({-class => "sme-layout"},
$q->submit (-name => 'action',
-value => $self->localise('SAVE'))))
)
)
),"\n";
print "</table></td></tr>\n";
return '';
}
=pod
=head2 performAndShowResult
Subroutine to perform actions and display result
=for testing
is($FM->performAndShowResult(), '', 'performAndShowResult');
=cut
sub performAndShowResult
{
my $self = shift;
my $q = $self->{cgi};
my $conf = esmith::ConfigDB->open();
my $ntpd = $conf->get('ntpd');
$conf->close();
my $hwSync = $ntpd->prop('SyncToHWClockSupported') || 'yes';
my $oldNtpServer = $ntpd->prop('NTPServer') || '';
my $oldNtpStatus = ($hwSync eq 'yes' and $oldNtpServer =~ m#^\s*$#) ? 'disabled' : ($ntpd->prop('status') || 'disabled');
my $newNtpServer = $q->param('ntpServer') || '';
my $newNtpStatus = $q->param('ntpStatus') || '';
# If ntp status was and still is disabled, then set the time.
if (($oldNtpStatus eq 'disabled') &&
($newNtpStatus eq 'disabled'))
{
$self->_performSetDateTime();
}
# If the ntp status changed, then force a reconfigure.
# If it is enabled and the server changed then force a reconfigure.
if (($oldNtpStatus ne $newNtpStatus) ||
(($newNtpStatus eq 'enabled') &&
($oldNtpServer ne $newNtpServer)))
{
# let ntp enable/disable itself as required
$self->_performSetTimeserver();
}
$q->Delete('ntpServer');
$q->Delete('ntpStatus');
return '';
}
=pod
=head2 verifyResult
Subroutine to verify result
=begin testing
is($FM->verifyResult(), '', 'verifyResult');
like($_STDOUT_, qr/NEW_DATE_AND_TIME/, ' .. new date and time');
=end testing
=cut
sub verifyResult
{
my $self = shift;
my $q = $self->{cgi};
$ENV{BASH_ENV} = '';
#--------------------------------------------------
# Read the time
#--------------------------------------------------
my ($weekdaydefault,
$monthnamedefault,
$monthdefault,
$daydefault,
$yeardefault,
$hourdefault,
$minutedefault,
$seconddefault,
$ampmdefault) = split /\|/, `/bin/date '+%A|%B|%-m|%-d|%Y|%-I|%M|%S|%p'`;
# get rid of trailing carriage return on last field
chop ($ampmdefault);
#--------------------------------------------------
# Figure out time zone by looking at /etc/localtime.
# If that doesn't work, default to US/Eastern.
#--------------------------------------------------
my $localtime;
my $timezonedefault = "US/Eastern";
if (defined ($localtime = readlink '/etc/localtime'))
{
my $pos = index $localtime, 'zoneinfo/';
if ($pos > -1)
{
$timezonedefault = substr $localtime, ($pos + 9);
}
}
#--------------------------------------------------
# Display the time
#--------------------------------------------------
print $q->Tr($q->td($q->p ($self->localise('NEW_DATE_AND_TIME'),
$q->b ($weekdaydefault,
$monthnamedefault,
$daydefault,
$yeardefault . ',',
$hourdefault . ':' . $minutedefault . ':' .
$seconddefault,
$ampmdefault,
$timezonedefault))));
return '';
}
=pod
=head2 _performSetDateTime
Subroutine to set the date and time of the e-smith server
=begin testing
$FM->{cgi}->param(-name=>'day', -value=>'55');
$FM->{cgi}->param(-name=>'year', -value=>'5');
is($FM->_performSetDateTime(), '', 'performSetDateTime');
like($_STDOUT_, qr/INVALID_DAY/, ' .. invalid day check');
$FM->{cgi}->param(-name=>'day', -value=>'10');
$FM->_performSetDateTime();
like($_STDOUT_, qr/INVALID_YEAR/, ' .. invalid year check');
$FM->{cgi}->param(-name=>'year', -value=>'1984');
$FM->{cgi}->param(-name=>'hour', -value=>'60');
$FM->{cgi}->param(-name=>'minute', -value=>'90');
$FM->_performSetDateTime();
like($_STDOUT_, qr/INVALID_HOUR/, ' .. invalid hour check');
$FM->{cgi}->param(-name=>'hour', -value=>'12');
$FM->_performSetDateTime();
like($_STDOUT_, qr/INVALID_MINUTE/, ' .. invalid minute check');
$FM->{cgi}->param(-name=>'minute', -value=>'00');
$FM->{cgi}->param(-name=>'second', -value=>'00');
SKIP: {
skip "unsafe!", 2 unless esmith::TestUtils::destruction_ok();
is($FM->_performSetDateTime(), '', ' .. exited happily');
like($_STDOUT_, qr/UPDATING_CLOCK/, ' .. updating clock in background');
}
=end testing
=cut
sub _performSetDateTime
{
my $self = shift;
my $q = $self->{cgi};
# Turn on autoflush, since setting the time forward makes Apache
# stop waiting for CGI output:
$| = 1;
#--------------------------------------------------
# Untaint parameters and check for validity
#--------------------------------------------------
my $timezone = $q->param ('timezone');
if ($timezone =~ /^([\w\-]+\/?[\w\-+]*)$/) {
$timezone = $1;
} else {
$timezone = "US/Eastern";
}
my $month = $q->param ('month');
if ($month =~ /^(\d{1,2})$/) {
$month = $1;
} else {
$month = "1";
}
if (($month < 1) || ($month > 12))
{
$q->param(-name => "status_message",
-value => $q->p($self->localise('INVALID_MONTH')." $month. ".
$self->localise('MONTH_BETWEEN_1_AND_12')));
return $self->error($self->localise('INVALID_MONTH')." $month. ".
$self->localise('MONTH_BETWEEN_1_AND_12'));
}
my $day = $q->param ('day');
if ($day =~ /^(\d{1,2})$/) {
$day = $1;
} else {
$day = "1";
}
if (($day < 1) || ($day > 31))
{
$q->param(-name => "status_message",
-value => $q->p($self->localise('INVALID_DAY')." $day. ".
$self->localise('BETWEEN_1_AND_31')));
return $self->error($self->localise('INVALID_DAY')." $day. ".
$self->localise('BETWEEN_1_AND_31'));
}
my $year = $q->param ('year');
if ($year =~ /^(\d{4})$/) {
$year = $1;
} else {
$year = "2000";
}
if (($year < 1900) || ($year > 2200))
{
$q->param(-name => "status_message",
-value => $q->p($self->localise('INVALID_YEAR')." $year. ".
$self->localise('FOUR_DIGIT_YEAR')));
return $self->error($self->localise('INVALID_YEAR')." $year. ".
$self->localise('FOUR_DIGIT_YEAR'));
}
my $hour = $q->param ('hour');
if ($hour =~ /^(\d{1,2})$/) {
$hour = $1;
} else {
$hour = "12";
}
if (($hour < 1) || ($hour > 12))
{
$q->param(-name => "status_message",
-value => $q->p($self->localise('INVALID_HOUR')." $hour. ".
$self->localise('BETWEEN_1_AND_12')));
return $self->error($self->localise('INVALID_HOUR')." $hour. ".
$self->localise('BETWEEN_1_AND_12'));
}
my $minute = $q->param ('minute');
if ($minute =~ /^(\d{1,2})$/) {
$minute = $1;
} else {
$minute = "0";
}
if (($minute < 0) || ($minute > 59))
{
$q->param(-name => "status_message",
-value => $q->p($self->localise('INVALID_MINUTE')." $minute. ".
$self->localise('BETWEEN_0_AND_59')));
return $self->error(self->localise('INVALID_MINUTE')." $minute. ".
$self->localise('BETWEEN_0_AND_59'));
}
my $second = $q->param ('second');
if ($second =~ /^(\d{1,2})$/) {
$second = $1;
} else {
$second = "0";
}
if (($second < 0) || ($second > 59))
{
$q->param(-name => "status_message",
-value => $q->p($self->localise('INVALID_SECOND')." $second. ".
$self->localise('BETWEEN_0_AND_59')));
return $self->error($self->localise('INVALID_SECOND')." $second. ".
$self->localise('BETWEEN_0_AND_59'));
}
my $ampm = $q->param ('ampm');
if ($ampm =~ /^(AM|PM)$/) {
$ampm = $1;
} else {
$ampm = "AM";
}
# convert to 24 hour time
$hour = $hour % 12;
if ($ampm eq "PM")
{
$hour = $hour + 12;
}
#--------------------------------------------------
# Store time zone in configuration database
#--------------------------------------------------
my $conf = esmith::ConfigDB->open();
my $old = $conf->get('UnsavedChanges')->value;
my $rec = $conf->get('TimeZone');
unless ($rec)
{
$rec = $conf->new_record('TimeZone',undef);
}
$rec->set_value($timezone);
$conf->get('UnsavedChanges')->set_value($old);
#--------------------------------------------------
# Signal event to change time zone, system time
# and hardware clock
#--------------------------------------------------
my $newdate = sprintf "%02d%02d%02d%02d%04d.%02d",
$month, $day, $hour, $minute, $year, $second;
esmith::util::backgroundCommand(2,
"/sbin/e-smith/signal-event","timezone-update",$newdate);
return $self->success('UPDATING_CLOCK');
}
=pod
=head2 _performSetTimeserver
Subroutine to set the NTP server
=begin testing
SKIP: {
skip "unsafe!", 3 unless esmith::TestUtils::destruction_ok();
is($FM->_performSetTimeserver(), '', 'performSetTimeserver');
$FM->{cgi}->param(-name=>'ntpEnabled', -value=>'on');
$FM->{cgi}->param(-name=>'ntpServer', -value=>'time.nrc.ca');
$FM->_performSetTimeserver();
like($_STDOUT_, qr/SETTINGS_CHANGED/, ' .. changed settings');
$FM->{cgi}->param(-name=>'ntpEnabled', -value=>'off');
$FM->_performSetTimeserver();
like($_STDOUT_, qr/SETTINGS_CHANGED/, ' .. and disabled');
}
=end testing
=cut
sub _performSetTimeserver
{
my $self = shift;
my $q = $self->{cgi};
my $msg;
#------------------------------------------------------------
# Verify the arguments and untaint the variables (see Camel
# book, "Detecting and laundering tainted data", pg. 358)
#------------------------------------------------------------
my $newStatus = '';
my $ntpServer = '';
if ($q->param ('ntpStatus') eq 'enabled')
{
$newStatus = "on";
}
else
{
$newStatus = "off";
}
if (defined ($q->param ('ntpServer')))
{
$ntpServer = $q->param ('ntpServer');
}
else
{
$ntpServer = "";
}
if ($newStatus ne "on") # asking to have NTP disabled
{
# make sure that the parameters are set for disabled
my $conf = esmith::ConfigDB->open();
my $old = $conf->get('UnsavedChanges')->value;
my $rec = $conf->get('ntpd');
if ($rec)
{
$rec->set_prop('status', ($rec->prop('SyncToHWClockSupported') || 'yes') eq 'yes' ? 'enabled' : 'disabled');
$rec->set_prop('NTPServer','');
}
else
{
$rec = $conf->new_record('ntpd',
{type=>'service', status=>'enabled', SyncToHWClockSupported => 'yes', NTPServer=>''});
}
$conf->get('UnsavedChanges')->set_value($old);
$msg = 'SERVER_DISABLED_DESC';
}
else # enable service and synch with ntpServer
{
if ($ntpServer eq "pool.ntp.org")
{
return $self->error('INVALID_NTP_ADDR');
}
elsif ($ntpServer =~ /^([a-zA-Z0-9\.\-]+)$/)
{
$ntpServer = $1;
}
elsif ($ntpServer =~ /^\s*$/)
{
$ntpServer = "";
}
else
{
return $self->error('INVALID_NTP_ADDR');
}
#------------------------------------------------------------
# Looks good; go ahead and change the parameters.
#------------------------------------------------------------
my $conf = esmith::ConfigDB->open();
my $old = $conf->get('UnsavedChanges')->value;
my $rec = $conf->get('ntpd');
if ($rec)
{
$rec->set_prop('status','enabled');
$rec->set_prop('NTPServer',$ntpServer);
}
else
{
$rec = $conf->new_record('ntpd',
{type=>'service',status=>'enabled',SyncToHWClockSupported => 'yes',NTPServer=>$ntpServer});
}
$conf->get('UnsavedChanges')->set_value($old);
$msg = 'SETTINGS_CHANGED';
if ($ntpServer =~ /^\s*$/)
{
$rec->set_prop('status', ($rec->prop('SyncToHWClockSupported') || 'yes') eq 'yes' ? 'enabled' : 'disabled');
$rec->set_prop('NTPServer', '');
$msg = 'INVALID_NTP_SERVER' if ($rec->prop('SyncToHWClockSupported') || 'yes') ne 'yes';
}
}
esmith::util::backgroundCommand(2,
"/sbin/e-smith/signal-event", "timeserver-update");
return $self->success($msg);
}
1;