[pkg-ntp-maintainers] Bug#388503: print "ntpq -c peers" in status

Christian Hammers ch at debian.org
Wed Sep 20 19:59:31 UTC 2006


Package: ntp
Version: 1:4.2.2+dfsg.2-2
Severity: wishlist
Tags: patch

Hi

The only thing that one normally does with a running ntpd is to query
if all peers are reachable so it would be quite handy if the
"/etc/init.d/ntp status" command would tell that in addition to the
plain "NTP server is running".

Giving a bit more info AFAIK does not contradict Debian or LSB policy as
long as the exit code remains the same.

I would probpose the below patch that gives the following output:

# /etc/init.d/ntp status
NTP server is running.

     remote           refid      st t when poll reach   delay   offset jitter
==============================================================================
 genesis.westend 131.188.3.222    2 u   12   64    3    3.341   -0.855 0.763


--- debian/ntp.init.orig        2006-09-20 21:49:05.000000000 +0200
+++ debian/ntp.init     2006-09-20 21:53:22.000000000 +0200
@@ -60,6 +60,7 @@
                status=$?
                if [ $status -eq 0 ]; then
                        log_success_msg "NTP server is running."
+                       echo; ntpq -c peers
                else
                        log_failure_msg "NTP server is not running."
                fi

(maybe there's a better LSB compliant log_*_msg but I don't know any 
that is multiline capable)

bye,

-christian-


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-2-amd64
Locale: LANG=de_DE at euro, LC_CTYPE=de_DE at euro (charmap=ISO-8859-15) (ignored: LC_ALL set to de_DE at euro)

Versions of packages ntp depends on:
ii  adduser                      3.97        Add and remove users and groups
ii  libc6                        2.3.6.ds1-4 GNU C Library: Shared libraries
ii  libcap1                      1:1.10-14   support for getting/setting POSIX.
ii  libreadline5                 5.1-8       GNU readline and history libraries
ii  libssl0.9.8                  0.9.8c-1    SSL shared libraries
ii  lsb-base                     3.1-15      Linux Standard Base 3.1 init scrip
ii  netbase                      4.26        Basic TCP/IP networking system
ii  perl-modules                 5.8.8-6.1   Core Perl modules
ii  psmisc                       22.3-1      Utilities that use the proc filesy

ntp recommends no packages.

-- no debconf information





More information about the pkg-ntp-maintainers mailing list