summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/ntp/files/sntp.rc')
-rw-r--r--net-misc/ntp/files/sntp.rc12
1 files changed, 6 insertions, 6 deletions
diff --git a/net-misc/ntp/files/sntp.rc b/net-misc/ntp/files/sntp.rc
index b0261d9d57dc..5b3b4632bfb9 100644
--- a/net-misc/ntp/files/sntp.rc
+++ b/net-misc/ntp/files/sntp.rc
@@ -1,15 +1,17 @@
-#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
+command="/usr/bin/sntp"
+
depend() {
before cron portmap
after net
use dns logger
}
-checkconfig() {
+start_pre() {
if [ -z "${SNTP_OPTS}" ] ; then
eerror "Please edit /etc/conf.d/sntp"
eerror "I need to know what server/options to use!"
@@ -19,9 +21,7 @@ checkconfig() {
}
start() {
- checkconfig || return $?
-
ebegin "Setting clock via SNTP"
- /usr/bin/sntp ${SNTP_OPTS}
+ ${command} ${SNTP_OPTS}
eend $? "Failed to set clock"
}