From d8e6bb470a092edb1508cd88bf4b49b7f97977d2 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 10 Mar 2009 09:37:29 +0100 Subject: [PATCH] Added ntp-4.2.4p6 template. --HG-- extra : convert_revision : c4a40d020f6aa132836167ea175cf2de7a47b0d3 --- templates/ntp-perl | 1 + templates/ntp/files/ntp.conf | 83 ++++++++++++++++++++++++++++++++++++ templates/ntp/files/ntpd | 19 +++++++++ templates/ntp/files/ntpdate | 36 ++++++++++++++++ templates/ntp/perl.template | 20 +++++++++ templates/ntp/template | 38 +++++++++++++++++ 6 files changed, 197 insertions(+) create mode 120000 templates/ntp-perl create mode 100644 templates/ntp/files/ntp.conf create mode 100644 templates/ntp/files/ntpd create mode 100644 templates/ntp/files/ntpdate create mode 100644 templates/ntp/perl.template create mode 100644 templates/ntp/template diff --git a/templates/ntp-perl b/templates/ntp-perl new file mode 120000 index 00000000000..e36e2d15073 --- /dev/null +++ b/templates/ntp-perl @@ -0,0 +1 @@ +ntp \ No newline at end of file diff --git a/templates/ntp/files/ntp.conf b/templates/ntp/files/ntp.conf new file mode 100644 index 00000000000..8d22843c63c --- /dev/null +++ b/templates/ntp/files/ntp.conf @@ -0,0 +1,83 @@ +# $NetBSD: ntp.conf,v 1.9 2007/02/10 19:36:56 reed Exp $ +# +# NetBSD default Network Time Protocol (NTP) configuration file for ntpd + +# This file is intended to be both a usable default, and a Quick-Start +# Guide. The directives and options listed here are not at all complete. +# A great deal of additional documentation, including links to FAQS and +# other guides, may be found on the official NTP web site, in particular +# +# http://www.ntp.org/documentation.html +# + +# Process ID file, so that the daemon can be signalled from scripts + +pidfile /var/run/ntpd.pid + +# The correction calculated by ntpd(8) for the local system clock's +# drift is stored here. + +driftfile /var/db/ntp.drift + +# Suppress the syslog(3) message for each peer synchronization change. + +logconfig -syncstatus + +# This will help minimize disruptions due to network congestion. Don't +# do this if you configure only one server! + +tos minsane 2 + +# Hereafter should be "server" or "peer" statements to configure other +# hosts to exchange NTP packets with. Peers should be selected in such +# a way that the network path to them is symmetric (that is, the series +# of links and routers used to get to the peer is the same one that the +# peer uses to get back. NTP assumes such symmetry in its network delay +# calculation. NTP will apply an incorrect adjustment to timestamps +# received from the peer if the path is not symmetric. This can result +# in clock skew (your system clock being maintained consistently wrong +# by a certain amount). +# +# The best way to select symmetric peers is to make sure that the +# network path to them is as short as possible (this reduces the chance +# that there is more than one network path between you and your peer). +# You can measure these distances with the traceroute(8) program. The +# best place to start looking for NTP peers for your system is within +# your own network, or at your Internet Service Provider (ISP). +# +# Ideally, you should select at least three other systems to talk NTP +# with, for an "what I tell you three times is true" effect. +# + +#peer an.ntp.peer.goes.here +#server an.ntp.server.goes.here + +# Public servers from the pool.ntp.org project. Volunteer's servers +# are dynamically assigned to the CNAMES below via DNS round-robin. +# The pool.ntp.org project needs more volunteers! The only criteria to +# join are a nailed-up connection and a static IP address. For details, +# see the web page: +# +# http://www.pool.ntp.org/ +# + +# The country codes can help you find servers that are net-wise close. +# As explained above, closer is better... + +# Northern U.S.A +#server ca.pool.ntp.org +#server us.pool.ntp.org +#server us.pool.ntp.org + +# Northern Europe +#server de.pool.ntp.org +#server de.pool.ntp.org +#server dk.pool.ntp.org + +# Depending on the vagaries of DNS can occasionally pull in the same +# server twice. The following CNAMES are guaranteed to be disjoint, at +# least over some short interval. + +server 0.pool.ntp.org +server 1.pool.ntp.org +server 2.pool.ntp.org diff --git a/templates/ntp/files/ntpd b/templates/ntp/files/ntpd new file mode 100644 index 00000000000..e836d88858d --- /dev/null +++ b/templates/ntp/files/ntpd @@ -0,0 +1,19 @@ +#!/bin/sh +# +# $NetBSD: ntpd,v 1.13 2004/08/13 18:08:03 mycroft Exp $ +# + +# PROVIDE: ntpd +# REQUIRE: DAEMON +# BEFORE: LOGIN + +$_rc_subr_loaded . /etc/rc.subr + +name="ntpd" +rcvar=$name +command="/usr/bin/${name}" +pidfile="/var/run/${name}.pid" +required_files="/etc/ntp.conf" + +load_rc_config $name +run_rc_command "$1" diff --git a/templates/ntp/files/ntpdate b/templates/ntp/files/ntpdate new file mode 100644 index 00000000000..a6f5bd99ab4 --- /dev/null +++ b/templates/ntp/files/ntpdate @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $NetBSD: ntpdate,v 1.18 2005/03/15 12:06:12 lukem Exp $ +# + +# PROVIDE: ntpdate +# REQUIRE: NETWORKING LOGIN + +$_rc_subr_loaded . /etc/rc.subr + +name="ntpdate" +rcvar=$name +command="/usr/bin/${name}" +start_cmd="ntpdate_start" +stop_cmd=":" + +ntpdate_start() +{ + if [ -z "$ntpdate_hosts" ]; then + ntpdate_hosts=$(awk ' + /^#/ { next } + /^(server|peer)[ \t]*127.127/ { next } + /^(server|peer)/ { if ($2 ~ /^-[46]/) + print $3 + else + print $2 } + '