Search
j0ke.net Open Build Service
>
Projects
>
oldschool
>
xntp
> ntp-4.2.2.SuSE-Config.diff
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File ntp-4.2.2.SuSE-Config.diff of Package xntp
--- README.SuSE +++ README.SuSE 2001/08/22 14:25:02 @@ -0,0 +1,10 @@ +################################################################### +- More documentation is available in the package `xntp-doc': + +Xntp-doc contains a complete set of documentation on building and configuring +a NTP server or client. The documentation is in the form of +HTML files suitable for browsing and contains links to additional +documentation at various web sites. If a browser is unavailable, +an ordinary text editor may also be used to view it. + +################################################################### --- README.caveats +++ README.caveats 2001/08/22 14:25:02 @@ -0,0 +1,11 @@ +CAVEATS +------- + +The latest NTPv4 ntpdc does not work with previous versions of ntpd +and previous versions of ntpdc do not work with latest ntpd. + +This situation is regrettable and may be fixed in future; however, +it is necessary in order for the autokey function to retrieve +canonical names and certificates from directory services +such as Secure DNS. + --- conf.SuSE/ntp.conf +++ conf.SuSE/ntp.conf 2001/08/22 14:25:02 @@ -0,0 +1,65 @@ +################################################################################ +## /etc/ntp.conf +## +## Sample NTP configuration file. +## See package 'xntp-doc' for documentation, Mini-HOWTO and FAQ. +## Copyright (c) 1998 S.u.S.E. GmbH Fuerth, Germany. +## +## Author: Michael Andres, <ma@suse.de> +## +################################################################################ + +## +## Radio and modem clocks by convention have addresses in the +## form 127.127.t.u, where t is the clock type and u is a unit +## number in the range 0-3. +## +## Most of these clocks require support in the form of a +## serial port or special bus peripheral. The particular +## device is normally specified by adding a soft link +## /dev/device-u to the particular hardware device involved, +## where u correspond to the unit number above. +## +## Generic DCF77 clock on serial port (Conrad DCF77) +## Address: 127.127.8.u +## Serial Port: /dev/refclock-u +## +## (create soft link /dev/refclock-0 to the particular ttyS?) +## +# server 127.127.8.0 mode 5 prefer + +## +## Undisciplined Local Clock. This is a fake driver intended for backup +## and when no outside source of synchronized time is available. +## +server 127.127.1.0 # local clock (LCL) +fudge 127.127.1.0 stratum 10 # LCL is unsynchronized + +## +## Outside source of synchronized time +## +## server xx.xx.xx.xx # IP address of server + +## +## Miscellaneous stuff +## + +driftfile /etc/ntp.drift # path for drift file + +logfile /var/log/ntp # alternate log file +# logconfig =syncstatus + sysevents +# logconfig =all + +# statsdir /tmp/ # directory for statistics files +# filegen peerstats file peerstats type day enable +# filegen loopstats file loopstats type day enable +# filegen clockstats file clockstats type day enable + +# +# Authentication stuff +# +# keys /etc/ntp.keys # path for keys file +# trustedkey 1 2 3 4 5 6 14 15 # define trusted keys +# requestkey 15 # key (7) for accessing server variables +# controlkey 15 # key (6) for accessing server variables + --- conf.SuSE/rc.config.xntp +++ conf.SuSE/rc.config.xntp 2001/08/22 14:25:02 @@ -0,0 +1,12 @@ +# +# Start XNTPD? (yes/no) +# +START_XNTPD=no + +# +# Usually it's a good idea to get the current time and date +# from some other ntp server, before xntpd is started. +# If we should do so, provide a space-separated list of +# ntp servers to query. +# +XNTPD_INITIAL_NTPDATE="" --- conf.SuSE/rc.xntpd +++ conf.SuSE/rc.xntpd 2001/08/22 14:26:21 @@ -0,0 +1,112 @@ +#! /bin/sh +# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany. +# +# Author: Michael Andres <feedback@suse.de> +# +### BEGIN INIT INFO +# Provides: xntpd ntpd +# Required-Start: $remote_fs $syslog named +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 5 +# Default-Stop: 0 1 6 +# Description: Start network time protocol daemon (NTPD). +### END INIT INFO + +# Source SuSE config +. /etc/rc.config + +# Determine the base and follow a runlevel link name. +base=${0##*/} +link=${base#*[SK][0-9][0-9]} + +# Force execution if not called by a runlevel directory. +test $link = $base && START_XNTPD=yes +test "$START_XNTPD" = yes || exit 0 + +NTPD_BIN=/usr/sbin/ntpd +test -x $NTPD_BIN || exit 5 + +# First reset status of this service +. /etc/rc.status +rc_reset + +# Return values acc. to LSB for all commands but status: +# 0 - success +# 1 - generic or unspecified error +# 2 - invalid or excess argument(s) +# 3 - unimplemented feature (e.g. "reload") +# 4 - insufficient privilege +# 5 - program is not installed +# 6 - program is not configured +# 7 - program is not running + +NTPDATE_BIN=/usr/sbin/ntpdate + +function ntpd_is_running() { + $0 status >/dev/null +} + +case "$1" in + start) + if [ -n "$XNTPD_INITIAL_NTPDATE" -a -x $NTPDATE_BIN ]; then + ntpd_is_running || { + echo -n "Try to set initial date and time via NTP" + # -b: Set time on runlevel change, otherwise let + # ntpdate decide whether to slew or step. + test $link = $base \ + && FORCE_STEP="" \ + || FORCE_STEP="-b" + # -u: Use an unprivileged port for outgoing packets, + # may be we have to synchronise with hosts beyond + # a firewall. + $NTPDATE_BIN -su $FORCE_STEP $XNTPD_INITIAL_NTPDATE \ + && echo $rc_done \ + || echo $rc_failed + # error here is reported but not propagated. + } + fi + + echo -n "Starting network time protocol daemon (NTPD)" + startproc $NTPD_BIN + rc_status -v + ;; + stop) + echo -n "Shutting network time protocol daemon (NTPD)" + killproc -TERM $NTPD_BIN + rc_status -v + ;; + try-restart) + ntpd_is_running && $0 restart + rc_status + ;; + restart) + $0 stop + $0 start + rc_status + ;; + force-reload) + # Does not support signalling to reload + $0 stop && $0 start + rc_status + ;; + reload) + echo -n "Reload network time protocol daemon (NTPD)" + # Does not support signalling to reload + rc_failed 3 + rc_status -v + ;; + status) + echo -n "Checking for network time protocol daemon (NTPD): " + checkproc $NTPD_BIN + rc_status -v + ;; + probe) + # test /etc/ntp.conf -nt /var/run/ntp.pid && echo restart + rc_failed 3 + ;; + *) + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" + exit 1 + ;; +esac +rc_exit