-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-#!/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!"
}
start() {
- checkconfig || return $?
-
ebegin "Setting clock via SNTP"
- /usr/bin/sntp ${SNTP_OPTS}
+ ${command} ${SNTP_OPTS}
eend $? "Failed to set clock"
}