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
commita432835e239235e524d1a90688cbcc60f461c23e (patch)
tree8563f67abaaf18fd13c45d6e10b4bc2630812e14 /net-misc/ntp/files
parentStable on ppc wrt bug #159951. (diff)
downloadhistorical-a432835e239235e524d1a90688cbcc60f461c23e.tar.gz
historical-a432835e239235e524d1a90688cbcc60f461c23e.tar.bz2
historical-a432835e239235e524d1a90688cbcc60f461c23e.zip
Cleanup ntp-client script by scrubbing the lame timeout code that never really worked. NTP itself handles timeouts sanely now.
Package-Manager: portage-2.1.2_rc4-r7
Diffstat (limited to 'net-misc/ntp/files')
-rw-r--r--net-misc/ntp/files/ntp-client.confd8
-rw-r--r--net-misc/ntp/files/ntp-client.rc11
2 files changed, 5 insertions, 14 deletions
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"
}