[oe-commits] Wenzong Fan : ntp: add status for initscript
git at git.openembedded.org
git at git.openembedded.org
Tue Oct 21 11:25:18 UTC 2014
Module: meta-openembedded.git
Branch: master-next
Commit: e1a118d0c06fd3c3b3d00bd61d81008b8ddbb163
URL: http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=e1a118d0c06fd3c3b3d00bd61d81008b8ddbb163
Author: Wenzong Fan <wenzong.fan at windriver.com>
Date: Mon Oct 20 02:30:18 2014 -0400
ntp: add status for initscript
Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
meta-networking/recipes-support/ntp/files/ntpd | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/meta-networking/recipes-support/ntp/files/ntpd b/meta-networking/recipes-support/ntp/files/ntpd
index 3cd1c6c..d1b9c49 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
More information about the Openembedded-commits
mailing list