]> Frank Brehm's Git Trees - config/bruni/etc.git/commitdiff
saving uncommitted changes in /etc prior to emerge run
authorFrank Brehm <frank@brehm-online.com>
Tue, 17 May 2016 23:31:59 +0000 (01:31 +0200)
committerFrank Brehm <frank@brehm-online.com>
Tue, 17 May 2016 23:31:59 +0000 (01:31 +0200)
init.d/ntpd
init.d/sntp

index f89bdd3c9354643a6018f12e52ec15c679ec8d10..5bed5ce757c00bb815cd97e0b82d8ed89a454c2d 100755 (executable)
@@ -1,5 +1,5 @@
-#!/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$
 
index b0261d9d57dc32b4b26ba76a64cc92295d12f657..5b3b4632bfb93253a4510ce00b7477e7bcb3d1c5 100755 (executable)
@@ -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"
 }