summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-01-09 17:51:14 +0000
committerMike Frysinger <vapier@gentoo.org>2007-01-09 17:51:14 +0000
commit2c015da52d598346ed5b6aaad9945b114b12e52b (patch)
tree4b6eae1365b5c9225b90efbb4aa41efdaab98d33 /net-misc/ntp
parentStable on ppc wrt bug #159951. (diff)
downloadgentoo-2-2c015da52d598346ed5b6aaad9945b114b12e52b.tar.gz
gentoo-2-2c015da52d598346ed5b6aaad9945b114b12e52b.tar.bz2
gentoo-2-2c015da52d598346ed5b6aaad9945b114b12e52b.zip
Cleanup ntp-client script by scrubbing the lame timeout code that never really worked. NTP itself handles timeouts sanely now.
(Portage version: 2.1.2_rc4-r7)
Diffstat (limited to 'net-misc/ntp')
-rw-r--r--net-misc/ntp/ChangeLog10
-rw-r--r--net-misc/ntp/files/ntp-client.confd8
-rw-r--r--net-misc/ntp/files/ntp-client.rc11
-rw-r--r--net-misc/ntp/ntp-4.2.2_p3.ebuild5
-rw-r--r--net-misc/ntp/ntp-4.2.2_p4.ebuild5
-rw-r--r--net-misc/ntp/ntp-4.2.4.ebuild5
6 files changed, 19 insertions, 25 deletions
diff --git a/net-misc/ntp/ChangeLog b/net-misc/ntp/ChangeLog
index 5675fdaa5d5b..046e13ea872b 100644
--- a/net-misc/ntp/ChangeLog
+++ b/net-misc/ntp/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/ntp
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ChangeLog,v 1.90 2006/12/31 14:45:20 vapier Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ChangeLog,v 1.91 2007/01/09 17:51:14 vapier Exp $
+
+ 09 Jan 2007; Mike Frysinger <vapier@gentoo.org> files/ntp-client.confd,
+ files/ntp-client.rc, ntp-4.2.2_p3.ebuild, ntp-4.2.2_p4.ebuild,
+ ntp-4.2.4.ebuild:
+ Cleanup ntp-client script by scrubbing the lame timeout code that never
+ really worked. NTP itself handles timeouts sanely now.
*ntp-4.2.4 (31 Dec 2006)
diff --git a/net-misc/ntp/files/ntp-client.confd b/net-misc/ntp/files/ntp-client.confd
index 44affac3924f..7c9d4546b45b 100644
--- a/net-misc/ntp/files/ntp-client.confd
+++ b/net-misc/ntp/files/ntp-client.confd
@@ -11,10 +11,4 @@ NTPCLIENT_CMD="ntpdate"
# change the default 'pool.ntp.org' to something closer
# to your machine. See http://www.pool.ntp.org/ or
# try running `netselect -s 3 pool.ntp.org`.
-NTPCLIENT_OPTS="-Q -b -u pool.ntp.org"
-
-# How long to wait (in seconds) before giving up.
-# Useful for when you boot and DNS/internet isn't
-# really available but you have your net interface
-# come up with say a static IP.
-NTPCLIENT_TIMEOUT=30
+NTPCLIENT_OPTS="-s -b -u pool.ntp.org"
diff --git a/net-misc/ntp/files/ntp-client.rc b/net-misc/ntp/files/ntp-client.rc
index d8b86ba9bfdf..704f2daea3ea 100644
--- a/net-misc/ntp/files/ntp-client.rc
+++ b/net-misc/ntp/files/ntp-client.rc
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.rc,v 1.8 2005/05/14 19:12:04 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/files/ntp-client.rc,v 1.9 2007/01/09 17:51:14 vapier Exp $
depend() {
before cron portmap
@@ -10,12 +10,12 @@ depend() {
}
checkconfig() {
- if [ ! -x "`which ${NTPCLIENT_CMD} 2>/dev/null`" ] ; then
+ if ! type -p ${NTPCLIENT_CMD} > /dev/null ; then
eerror "Please edit /etc/conf.d/ntp-client"
eerror "Unable to locate the client command ${NTPCLIENT_CMD}!"
return 1
fi
- if [ -z "${NTPCLIENT_OPTS}" ] ; then
+ if [[ -z ${NTPCLIENT_OPTS} ]] ; then
eerror "Please edit /etc/conf.d/ntp-client"
eerror "I need to know what server/options to use!"
return 1
@@ -28,8 +28,5 @@ start() {
ebegin "Setting clock via the NTP client '${NTPCLIENT_CMD}'"
${NTPCLIENT_CMD} ${NTPCLIENT_OPTS} >/dev/null &
- local pid=$!
- (sleep ${NTPCLIENT_TIMEOUT:-30}; kill -9 ${pid} >&/dev/null) &
- wait ${pid}
eend $? "Failed to set clock"
}
diff --git a/net-misc/ntp/ntp-4.2.2_p3.ebuild b/net-misc/ntp/ntp-4.2.2_p3.ebuild
index e875e8de706e..f65eca2355d0 100644
--- a/net-misc/ntp/ntp-4.2.2_p3.ebuild
+++ b/net-misc/ntp/ntp-4.2.2_p3.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.2_p3.ebuild,v 1.16 2006/12/29 22:23:52 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.2_p3.ebuild,v 1.17 2007/01/09 17:51:14 vapier Exp $
inherit eutils toolchain-funcs
@@ -99,7 +99,6 @@ src_install() {
newinitd "${FILESDIR}"/ntp-client.rc ntp-client
newconfd "${FILESDIR}"/ntp-client.confd ntp-client
use caps || dosed "s|-u ntp:ntp||" /etc/conf.d/ntpd
- dosed "s:-Q::" /etc/conf.d/ntp-client # no longer needed
dosed "s:/usr/bin:/usr/sbin:" /etc/init.d/ntpd
keepdir /var/lib/ntp
diff --git a/net-misc/ntp/ntp-4.2.2_p4.ebuild b/net-misc/ntp/ntp-4.2.2_p4.ebuild
index aa1b4d57bd03..5fe1f4f030fe 100644
--- a/net-misc/ntp/ntp-4.2.2_p4.ebuild
+++ b/net-misc/ntp/ntp-4.2.2_p4.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.2_p4.ebuild,v 1.3 2006/12/31 14:36:24 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.2_p4.ebuild,v 1.4 2007/01/09 17:51:14 vapier Exp $
inherit eutils toolchain-funcs
@@ -99,7 +99,6 @@ src_install() {
newinitd "${FILESDIR}"/ntp-client.rc ntp-client
newconfd "${FILESDIR}"/ntp-client.confd ntp-client
use caps || dosed "s|-u ntp:ntp||" /etc/conf.d/ntpd
- dosed "s:-Q::" /etc/conf.d/ntp-client # no longer needed
dosed "s:/usr/bin:/usr/sbin:" /etc/init.d/ntpd
keepdir /var/lib/ntp
diff --git a/net-misc/ntp/ntp-4.2.4.ebuild b/net-misc/ntp/ntp-4.2.4.ebuild
index e80972793820..baa50fde659a 100644
--- a/net-misc/ntp/ntp-4.2.4.ebuild
+++ b/net-misc/ntp/ntp-4.2.4.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.4.ebuild,v 1.1 2006/12/31 14:45:20 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/ntp/ntp-4.2.4.ebuild,v 1.2 2007/01/09 17:51:14 vapier Exp $
inherit eutils toolchain-funcs
@@ -99,7 +99,6 @@ src_install() {
newinitd "${FILESDIR}"/ntp-client.rc ntp-client
newconfd "${FILESDIR}"/ntp-client.confd ntp-client
use caps || dosed "s|-u ntp:ntp||" /etc/conf.d/ntpd
- dosed "s:-Q::" /etc/conf.d/ntp-client # no longer needed
dosed "s:/usr/bin:/usr/sbin:" /etc/init.d/ntpd
keepdir /var/lib/ntp