All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] chrony: add sysv initscript
@ 2014-09-01 13:24 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2014-09-01 13:24 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=d016a6a30dd86f5d6a02663fa4729a75e48ae379
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/chrony/S49chrony |   26 ++++++++++++++++++++++++++
 package/chrony/chrony.mk |    4 ++++
 2 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/package/chrony/S49chrony b/package/chrony/S49chrony
new file mode 100755
index 0000000..66a50d5
--- /dev/null
+++ b/package/chrony/S49chrony
@@ -0,0 +1,26 @@
+#!/bin/sh
+#
+# Start chrony
+
+[ -f /etc/chrony.conf ] || exit 0
+
+case "$1" in
+  start)
+	echo "Starting chrony: "
+	chronyd && echo "OK" || echo "FAIL"
+	;;
+  stop)
+	echo -n "Stopping chrony: "
+	killall chronyd && echo "OK" || echo "FAIL"
+	;;
+  restart|reload)
+	"$0" stop
+	sleep 1
+	"$0" start
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart}"
+	exit 1
+esac
+
+exit $?
diff --git a/package/chrony/chrony.mk b/package/chrony/chrony.mk
index 09a4a1e..afe0fc8 100644
--- a/package/chrony/chrony.mk
+++ b/package/chrony/chrony.mk
@@ -39,4 +39,8 @@ define CHRONY_INSTALL_TARGET_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
 endef
 
+define CHRONY_INSTALL_INIT_SYSV
+	$(INSTALL) -D -m 755 package/chrony/S49chrony $(TARGET_DIR)/etc/init.d/S49chrony
+endef
+
 $(eval $(generic-package))

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-01 13:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-01 13:24 [Buildroot] [git commit] chrony: add sysv initscript Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.