Package: chrony Version: 1.24-3.1 Severity: wishlist Tags: patch
Here is a patch to add support for the "status" action to the init.d script of chrony.
diff -u chrony-1.24/debian/changelog chrony-1.24/debian/changelog --- chrony-1.24/debian/changelog +++ chrony-1.24/debian/changelog @@ -1,3 +1,9 @@ +chrony (1.24-3.2) UNRELEASED; urgency=low + + * Added support for "status" action to init.d script + + -- Peter Eisentraut <pet...@debian.org> Wed, 14 Dec 2011 19:33:35 +0200 + chrony (1.24-3.1) unstable; urgency=low * Non-maintainer upload. diff -u chrony-1.24/debian/control chrony-1.24/debian/control --- chrony-1.24/debian/control +++ chrony-1.24/debian/control @@ -7,7 +7,7 @@ Package: chrony Architecture: any -Depends: ${misc:Depends}, ${shlibs:Depends}, ucf, timelimit, dpkg (>=1.15.4) | install-info +Depends: ${misc:Depends}, ${shlibs:Depends}, ucf, timelimit, dpkg (>=1.15.4) | install-info, lsb-base Recommends: udev (>= 0.124-1) Conflicts: ntp, ntp-simple, ntp-refclock, time-daemon Provides: time-daemon diff -u chrony-1.24/debian/init.d chrony-1.24/debian/init.d --- chrony-1.24/debian/init.d +++ chrony-1.24/debian/init.d @@ -25,6 +25,8 @@ test -f $DAEMON || exit 0 +. /lib/lsb/init-functions + putonline () { # Do we have a default route? If so put chronyd online. if timelimit -q -s9 -t5 -- netstat -rn 2>/dev/null | grep UG | cut -f 1 -d ' ' | grep -q '0\.0\.0\.0' @@ -89,8 +91,11 @@ ;; esac ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; *) - echo "Usage: /etc/init.d/chrony {start|stop|restart|force-reload}" + echo "Usage: /etc/init.d/chrony {start|stop|restart|force-reload|status}" exit 1 ;; esac