/[gentoo-x86]/net-misc/openntpd/files/openntpd.init.d-3.9_p1-r4
Gentoo

Contents of /net-misc/openntpd/files/openntpd.init.d-3.9_p1-r4

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Aug 13 15:38:31 2011 UTC (3 years, 4 months ago) by nelchael
Branch: MAIN
Revision bump to fix bug #241002 (OpenRC related improvements) and bug #363051 (hardcoded ntp directory in init.d script).

(Portage version: 2.1.10.11/cvs/Linux x86_64)

1 #!/sbin/runscript
2 # Copyright 1999-2011 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4 # $Header: /var/cvsroot/gentoo-x86/net-misc/openntpd/files/openntpd.rc-3.9_p1-r2,v 1.3 2011/03/05 22:14:25 vapier Exp $
5
6 name="OpenNTPD"
7 command="/usr/sbin/ntpd"
8 command_args="${NTPD_OPTS}"
9
10 depend() {
11 need net
12 after ntp-client
13 use dns logger
14 }
15
16 start_pre() {
17 if [ ! -f /etc/ntpd.conf ] ; then
18 eerror "Could not find /etc/ntpd.conf!"
19 return 1
20 fi
21
22 if [ -x /usr/bin/getent ] ; then
23 if [ "`getent passwd ntp | cut -d: -f 6`" != "${NTPD_HOME}" ] ; then
24 eerror "Home directory of ntp needs to be ${NTPD_HOME}"
25 eerror "Please run 'usermod -d ${NTPD_HOME} ntp'"
26 return 1
27 fi
28 fi
29
30 checkpath -d -o 0:0 "${NTPD_HOME}"
31
32 # prepare chroot
33 mkdir -p "${NTPD_HOME}/etc"
34 cp /etc/localtime "${NTPD_HOME}/etc"
35
36 return 0
37 }

  ViewVC Help
Powered by ViewVC 1.1.20