From 273ae8399e2bfa3b67bf062ced8e9291b58bba7b Mon Sep 17 00:00:00 2001 From: Wenzong Fan Date: Mon, 20 Oct 2014 02:30:18 -0400 Subject: ntp: add status for initscript Signed-off-by: Wenzong Fan Signed-off-by: Joe MacDonald --- meta-networking/recipes-support/ntp/files/ntpd | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'meta-networking/recipes-support') diff --git a/meta-networking/recipes-support/ntp/files/ntpd b/meta-networking/recipes-support/ntp/files/ntpd index 3cd1c6c585..d1b9c49076 100755 --- a/meta-networking/recipes-support/ntp/files/ntpd +++ b/meta-networking/recipes-support/ntp/files/ntpd @@ -20,6 +20,9 @@ test -x $DAEMON -a -r /etc/ntp.conf || exit 0 # rcS contains TICKADJ test -r /etc/default/rcS && . /etc/default/rcS +# Source function library. +. /etc/init.d/functions + # Functions to do individual actions settick(){ # If TICKADJ is set we *must* adjust it before we start, because the @@ -68,8 +71,12 @@ case "$1" in stopdaemon startdaemon ;; + status) + status /usr/sbin/ntpd; + exit $? + ;; *) - echo "Usage: ntpd { start | stop | restart | reload }" >&2 + echo "Usage: ntpd { start | stop | status | restart | reload }" >&2 exit 1 ;; esac -- cgit v1.2.3-54-g00ecf