summaryrefslogtreecommitdiff
path: root/net-misc/adjtimex/files/adjtimex.init
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-misc/adjtimex/files/adjtimex.init
reinit the tree, so we can have metadata
Diffstat (limited to 'net-misc/adjtimex/files/adjtimex.init')
-rw-r--r--net-misc/adjtimex/files/adjtimex.init34
1 files changed, 34 insertions, 0 deletions
diff --git a/net-misc/adjtimex/files/adjtimex.init b/net-misc/adjtimex/files/adjtimex.init
new file mode 100644
index 000000000000..ef46890bf3c9
--- /dev/null
+++ b/net-misc/adjtimex/files/adjtimex.init
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DAEMON=adjtimex
+OPTS="--tick ${TICK} --frequency ${FREQ}"
+CONFD="/etc/conf.d/${DAEMON}"
+
+depend() {
+ before ntp-client ntpd
+ need localmount
+}
+
+checkconfig() {
+ if [ ! -f "${CONFD}" ]; then
+ eerror "Configuration file not found!"
+ eerror "You must run adjtimexconfig to create it."
+ return 1
+ fi
+}
+
+
+start() {
+ checkconfig || return 1
+ ebegin "Regulating system clock with ${DAEMON}..."
+ /usr/sbin/${DAEMON} ${OPTS}
+ eend $?
+}
+
+stop() {
+ :
+}
+
+# vim: ts=4 sw=4 ft=gentoo-init-d: