summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2002-03-24 14:25:31 +0000
committerMartin Schlemmer <azarah@gentoo.org>2002-03-24 14:25:31 +0000
commitbecdc0945a0fc925a34e892816062948d98e4add (patch)
tree6e39b6f94ed0e701230d15dd5985b953bdd93687
parentg2boojum forgot to update the ChangeLog. Bad boy. (diff)
downloadgentoo-2-becdc0945a0fc925a34e892816062948d98e4add.tar.gz
gentoo-2-becdc0945a0fc925a34e892816062948d98e4add.tar.bz2
gentoo-2-becdc0945a0fc925a34e892816062948d98e4add.zip
resolve bug #897 and other rc-script enhancements
-rw-r--r--net-misc/ntp/ChangeLog8
-rw-r--r--net-misc/ntp/files/digest-ntp-4.1.72-r11
-rw-r--r--net-misc/ntp/files/ntpd.confd7
-rw-r--r--net-misc/ntp/files/ntpd.rc647
-rw-r--r--net-misc/ntp/ntp-4.1.72-r1.ebuild38
5 files changed, 93 insertions, 8 deletions
diff --git a/net-misc/ntp/ChangeLog b/net-misc/ntp/ChangeLog
index 6eae82baa25f..7e70d7e1d983 100644
--- a/net-misc/ntp/ChangeLog
+++ b/net-misc/ntp/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/ntp
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ChangeLog,v 1.1 2002/02/01 21:53:35 gbevin Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ChangeLog,v 1.2 2002/03/24 14:25:31 azarah Exp $
+
+*ntp-4.1.72-r1 (24 March 2002)
+
+ 24 March 2002; M.Schlemmer <azarah@gentoo.org> :
+
+ Resolve bug #897 (add ntpdate to rc-script); add config file for ntpd.
*ntp-4.1.72 (1 Feb 2002)
diff --git a/net-misc/ntp/files/digest-ntp-4.1.72-r1 b/net-misc/ntp/files/digest-ntp-4.1.72-r1
new file mode 100644
index 000000000000..af9d351edea8
--- /dev/null
+++ b/net-misc/ntp/files/digest-ntp-4.1.72-r1
@@ -0,0 +1 @@
+MD5 de9ed6a28f4c4ffea932a49db5b745fa ntp-4.1.72.tar.gz 2523934
diff --git a/net-misc/ntp/files/ntpd.confd b/net-misc/ntp/files/ntpd.confd
new file mode 100644
index 000000000000..7ae77e8fc443
--- /dev/null
+++ b/net-misc/ntp/files/ntpd.confd
@@ -0,0 +1,7 @@
+# Config file for /etc/init.d/ntpd
+
+
+# Name of the server ntpd should sync with
+
+#NTPDATESERVER=ntp.ctr.columbia.edu
+
diff --git a/net-misc/ntp/files/ntpd.rc6 b/net-misc/ntp/files/ntpd.rc6
index 518b4dd86f7f..4626af64c48a 100644
--- a/net-misc/ntp/files/ntpd.rc6
+++ b/net-misc/ntp/files/ntpd.rc6
@@ -1,20 +1,53 @@
#!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.rc6,v 1.2 2001/12/06 20:17:02 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntpd.rc6,v 1.3 2002/03/24 14:25:31 azarah Exp $
+
+#NB: Config is in /etc/conf.d/ntpd
+
depend() {
need net
}
+checkconfig() {
+ if [ ! -f /etc/ntp.conf ] && [ -z "${NTPDATESERVER}" ]
+ then
+ eerror "Please create /etc/ntp.conf or set \$NTPDATESERVER"
+ eerror "in /etc/conf.d/ntp"
+ return 1
+ fi
+ return 0
+}
+
start() {
- ebegin "Starting ntpd"
- start-stop-daemon --start --quiet --exec /usr/bin/ntpd -- -p /var/run/ntpd.pid
- eend $?
+ checkconfig || return $?
+ if [ ! -f /etc/ntp.conf ] && [ -n "${NTPDATESERVER}" ]
+ then
+ echo "server ${NTPDATESERVER}" >/etc/ntp.conf
+ echo "driftfile /etc/ntp.drift" >>/etc/ntp.conf
+ fi
+ if [ -n "${NTPDATESERVER}" ]
+ then
+ ebegin "Running ntpdate"
+ ntpdate ${NTPDATESERVER} > /dev/null
+ eend $? "Failed to run ntpdate"
+ fi
+ ebegin "Starting ntpd"
+ start-stop-daemon --start --quiet --pidfile /var/run/ntpd.pid \
+ --startas /usr/bin/ntpd -- -p /var/run/ntpd.pid
+ eend $? "Failed to start ntpd"
}
stop() {
- ebegin "Stopping ntpd"
- start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid
- eend $?
+ ebegin "Stopping ntpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid
+ eend $? "Failed to stop ntpd"
+
+ # clean stale pidfile
+ if [ -f /var/run/ntpd.pid ]
+ then
+ rm -f /var/run/ntpd.pid
+ fi
}
+
diff --git a/net-misc/ntp/ntp-4.1.72-r1.ebuild b/net-misc/ntp/ntp-4.1.72-r1.ebuild
new file mode 100644
index 000000000000..e2e73ed46d01
--- /dev/null
+++ b/net-misc/ntp/ntp-4.1.72-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Terry Chan <tchan@enteract.com>
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.1.72-r1.ebuild,v 1.1 2002/03/24 14:25:31 azarah Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Network Time Protocol suite/programs"
+SRC_URI="http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/${P}.tar.gz"
+HOMEPAGE="http://www.ntp.org/"
+
+DEPEND="virtual/glibc
+ >=sys-libs/ncurses-5.2
+ >=sys-libs/readline-4.1"
+
+src_compile() {
+ cp configure configure.orig
+ sed -e "s:-Wpointer-arith::" configure.orig > configure
+ LDFLAGS="$LDFLAGS -lncurses"
+
+ ./configure --prefix=/usr --mandir=/usr/share/man \
+ --host=${CHOST} --build=${CHOST} || die
+
+ emake || die
+}
+
+src_install () {
+ make prefix=${D}/usr mandir=${D}/usr/share/man install || die
+
+ dodoc ChangeLog INSTALL NEWS README TODO WHERE-TO-START
+ insinto /usr/share/doc/${PF}/html ; doins html/*.htm
+ insinto /usr/share/doc/${PF}/html/hints ; doins html/hints/*
+ insinto /usr/share/doc/${PF}/html/pic ; doins html/pic/*
+
+ insinto /usr/share/ntp ; doins scripts/*
+
+ exeinto /etc/init.d ; newexe ${FILESDIR}/ntpd.rc6 ntpd
+ insinto /etc/conf.d ; newins ${FILESDIR}/ntpd.confd ntpd
+}