summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-misc/tlsdate/files/tlsdate.rc')
-rwxr-xr-xnet-misc/tlsdate/files/tlsdate.rc17
1 files changed, 17 insertions, 0 deletions
diff --git a/net-misc/tlsdate/files/tlsdate.rc b/net-misc/tlsdate/files/tlsdate.rc
new file mode 100755
index 000000000000..95ee306745c6
--- /dev/null
+++ b/net-misc/tlsdate/files/tlsdate.rc
@@ -0,0 +1,17 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+description="set time once when started"
+
+depend() {
+ use net
+}
+
+start() {
+ : ${TLSDATE_CMD:=tlsdate}
+ ebegin "Setting clock via tlsdate '${TLSDATE_CMD}'"
+ "${TLSDATE_CMD}" ${TLSDATE_OPTS}
+ eend $? "Failed to set clock"
+}