* [gentoo-commits] gentoo-x86 commit in net-misc/chrony/files: chronyd.init
@ 2013-02-04 12:27 Jeroen Roovers (jer)
0 siblings, 0 replies; only message in thread
From: Jeroen Roovers (jer) @ 2013-02-04 12:27 UTC (permalink / raw
To: gentoo-commits
jer 13/02/04 12:27:46
Added: chronyd.init
Log:
Version bump.
(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Revision Changes Path
1.1 net-misc/chrony/files/chronyd.init
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/chrony/files/chronyd.init?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/chrony/files/chronyd.init?rev=1.1&content-type=text/plain
Index: chronyd.init
===================================================================
#!/sbin/runscript
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/chrony/files/chronyd.init,v 1.1 2013/02/04 12:27:46 jer Exp $
depend() {
use dns
}
checkconfig() {
# Note that /etc/chrony/chrony.keys is *NOT* checked. This
# is because the user may have specified another key
# file, and we don't want to force the user to use that
# exact name for the key file.
if [ ! -f "${CFGFILE}" ] ; then
eerror "Please create ${CFGFILE} and the"
eerror "chrony key file (usually /etc/chrony/chrony.keys)"
eerror "by using the"
eerror ""
eerror " chrony.conf.example"
eerror " chrony.keys.example"
eerror ""
eerror "files (from the documentation directory)"
eerror "as templates."
return 1
else
# Actually, I tried it, and chrony seems to ignore the pidfile
# option. I'm going to leave it here anyway, since you never
# know if it might be handy
PIDFILE=`awk '/^ *pidfile/{print $2}' "${CFGFILE}"`
fi
return 0
}
setxtrarg() {
if [ -c /dev/rtc ]; then
grep -q '^rtcfile' "${CFGFILE}" && ARGS="${ARGS} -s"
fi
grep -q '^dumponexit$' "${CFGFILE}" && ARGS="${ARGS} -r"
return 0
}
start() {
checkconfig || return $?
setxtrarg
[ -n "${PIDFILE}" ] || PIDFILE=/run/chronyd.pid
ebegin "Starting chronyd"
start-stop-daemon --start --background --quiet \
--exec /usr/sbin/chronyd \
--pidfile "${PIDFILE}" \
-- -f "${CFGFILE}" ${ARGS}
eend $? "Failed to start chronyd"
}
stop() {
checkconfig || return $?
[ -n "${PIDFILE}" ] || PIDFILE=/run/chronyd.pid
ebegin "Stopping chronyd"
start-stop-daemon --stop --quiet \
--pidfile "${PIDFILE}"
eend $? "Failed to stop chronyd"
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-02-04 12:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-04 12:27 [gentoo-commits] gentoo-x86 commit in net-misc/chrony/files: chronyd.init Jeroen Roovers (jer)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox