From: Mike Frysinger Date: Tue, 9 Jan 2007 17:51:14 +0000 (+0000) Subject: Cleanup ntp-client script by scrubbing the lame timeout code that never really worked... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a432835e239235e524d1a90688cbcc60f461c23e;p=gentoo.git 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 --- 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 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/Manifest b/net-misc/ntp/Manifest index f67de776c57e..269f99346907 100644 --- a/net-misc/ntp/Manifest +++ b/net-misc/ntp/Manifest @@ -1,14 +1,14 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -AUX ntp-client.confd 747 RMD160 06c8312f745b6d532d41cb9f2319ef91c7d26c4a SHA1 5b1bf1d65683b66c284bee25e14b7f66fe21ec46 SHA256 fe0277d2b38cc52c2336b20fb46a62c20e2a273f025bbad6348a393aac4bb3ee -MD5 47d7106c23cb6ac99c5bbfdcd2f3a7fa files/ntp-client.confd 747 -RMD160 06c8312f745b6d532d41cb9f2319ef91c7d26c4a files/ntp-client.confd 747 -SHA256 fe0277d2b38cc52c2336b20fb46a62c20e2a273f025bbad6348a393aac4bb3ee files/ntp-client.confd 747 -AUX ntp-client.rc 933 RMD160 39a8545bdfa1677a9762eeebecac3adc888e7fd8 SHA1 c44e4b133f197a65ee6472c8fceafe80265766f7 SHA256 604aefe6f48040255ed563b424ce9cde9370ff824fa12adee553d19603278868 -MD5 5eecb47ab966b2003b73b8cbd371de40 files/ntp-client.rc 933 -RMD160 39a8545bdfa1677a9762eeebecac3adc888e7fd8 files/ntp-client.rc 933 -SHA256 604aefe6f48040255ed563b424ce9cde9370ff824fa12adee553d19603278868 files/ntp-client.rc 933 +AUX ntp-client.confd 542 RMD160 56a97ff793cafdc125150603332e7853689f2af7 SHA1 539bddeae804dfaf0bad9e57518ec238f268bbfd SHA256 dfff01e422d59081e2f09606163f5853009b1b41120748f5205023ac7579322d +MD5 499bd9dde3ba3550aec376984ffa448c files/ntp-client.confd 542 +RMD160 56a97ff793cafdc125150603332e7853689f2af7 files/ntp-client.confd 542 +SHA256 dfff01e422d59081e2f09606163f5853009b1b41120748f5205023ac7579322d files/ntp-client.confd 542 +AUX ntp-client.rc 833 RMD160 93c622ce79a180276c5a02c4e093884cf204f2c2 SHA1 b8557a790fa1fa251855e5b5a86c0ca6138c70ab SHA256 e24cb73c0cdf7c181c4c60f196ba79c5fbbb95888d57f4cbbd61086c163732d1 +MD5 e02867c7adb601efab9ffacfc90c47f8 files/ntp-client.rc 833 +RMD160 93c622ce79a180276c5a02c4e093884cf204f2c2 files/ntp-client.rc 833 +SHA256 e24cb73c0cdf7c181c4c60f196ba79c5fbbb95888d57f4cbbd61086c163732d1 files/ntp-client.rc 833 AUX ntp.conf 1451 RMD160 530166d0908cbe0a812cb3b5d5d59b8e1d8457c5 SHA1 3625ed2aa71d9e0dd04634f32e65d83b76cfe780 SHA256 4dd53d6c91aa7680b8e9d9f3fd9f2406463286377a2864ddfc7c005f9928f500 MD5 5bd3924f5720b97837969ec4ec4d5e09 files/ntp.conf 1451 RMD160 530166d0908cbe0a812cb3b5d5d59b8e1d8457c5 files/ntp.conf 1451 @@ -27,22 +27,22 @@ DIST ntp-4.2.2p4-manpages.tar.bz2 48792 RMD160 f87e58acdd7c7d3ef2bc3e008f605a4ef DIST ntp-4.2.2p4.tar.gz 2499611 RMD160 59e87403c14613c2aa6f619fa0c53aaae42962db SHA1 5239d2fa462555bc7b9031cc2abc3e10dda61f60 SHA256 08544958c6db9a9042a997fdd8245e909d9280a42b6d197edb9062d4cabfd6f4 DIST ntp-4.2.4-manpages.tar.bz2 49084 RMD160 a0f58094502b309e777b0e227f8e8b0c316f6c26 SHA1 1b9bcc67c7a82d9420f3f84e6cb019a59959dda9 SHA256 47daa90cec64bb1796f2194732972ee94947c64e64e571b27d2b77b3741991d6 DIST ntp-4.2.4.tar.gz 3417698 RMD160 bd51211582958f7c7d14ecd5ba04f5815bdc7ef8 SHA1 a068541afa9b2fdfae8859d773baf739c1e08b1e SHA256 a8adc8134d692273673559da3a4181e12cfb166f2177c726f916d4a9ff18182f -EBUILD ntp-4.2.2_p3.ebuild 3872 RMD160 f25d9328d09cf8a50189eab1b02d310532e183ba SHA1 c1abd5c97128f782a74091644d2b5ee26510af3b SHA256 899f4d2f2a56fffccf2dd8bbffa91b85531ab3f60c0fb3d97b2755428b7732b7 -MD5 968721a6ecff48508939766478d89e83 ntp-4.2.2_p3.ebuild 3872 -RMD160 f25d9328d09cf8a50189eab1b02d310532e183ba ntp-4.2.2_p3.ebuild 3872 -SHA256 899f4d2f2a56fffccf2dd8bbffa91b85531ab3f60c0fb3d97b2755428b7732b7 ntp-4.2.2_p3.ebuild 3872 -EBUILD ntp-4.2.2_p4.ebuild 3884 RMD160 c1b6b791254b4dad2427692687baa8d114b9fc6b SHA1 8366ff50a4ae6b5e84cfee09c518be31a3bb2ab5 SHA256 4eb429fb97871a55cc02156011df05b2a7a1df0bda01b876be335ba5e2909cd6 -MD5 e025a83a527b6da5ec3ac5c4173bba92 ntp-4.2.2_p4.ebuild 3884 -RMD160 c1b6b791254b4dad2427692687baa8d114b9fc6b ntp-4.2.2_p4.ebuild 3884 -SHA256 4eb429fb97871a55cc02156011df05b2a7a1df0bda01b876be335ba5e2909cd6 ntp-4.2.2_p4.ebuild 3884 -EBUILD ntp-4.2.4.ebuild 3886 RMD160 0d4828425c5f7c1609dffa2bfe7237dd9a8f3634 SHA1 72bfb94b12f03e061a20382f25335ebf73cb75b7 SHA256 008e2162f08014f567d0e307f9bbefae8704d9e6000242a5642db9addd69552e -MD5 91d4406d36476214de58ad7d3a4cfce5 ntp-4.2.4.ebuild 3886 -RMD160 0d4828425c5f7c1609dffa2bfe7237dd9a8f3634 ntp-4.2.4.ebuild 3886 -SHA256 008e2162f08014f567d0e307f9bbefae8704d9e6000242a5642db9addd69552e ntp-4.2.4.ebuild 3886 -MISC ChangeLog 13289 RMD160 7ad336a555e1e09f05f0d9bc0e404364030bb67b SHA1 d064284cff59340b16991b5a5c2d165dff23ebd1 SHA256 8c3c9c4de07acf2c276ed2961da6e1bc1404eb4971605a75f98f1e4b0f8354d9 -MD5 c54734f025aaa7693be8d17a664e9b94 ChangeLog 13289 -RMD160 7ad336a555e1e09f05f0d9bc0e404364030bb67b ChangeLog 13289 -SHA256 8c3c9c4de07acf2c276ed2961da6e1bc1404eb4971605a75f98f1e4b0f8354d9 ChangeLog 13289 +EBUILD ntp-4.2.2_p3.ebuild 3814 RMD160 80291dab054c6e5812dfcb9c055e712dd9fb3083 SHA1 5043ea79e00a866a3ba96c8c4bb8069928dc90b6 SHA256 1044be84aba64a90fc7a32e4f3fa83351cd0498521408d1f862ae10fa016ee0c +MD5 409cb6d0a58ab212aa669787600d8c35 ntp-4.2.2_p3.ebuild 3814 +RMD160 80291dab054c6e5812dfcb9c055e712dd9fb3083 ntp-4.2.2_p3.ebuild 3814 +SHA256 1044be84aba64a90fc7a32e4f3fa83351cd0498521408d1f862ae10fa016ee0c ntp-4.2.2_p3.ebuild 3814 +EBUILD ntp-4.2.2_p4.ebuild 3826 RMD160 e654dd8831545dd73fbf202927be443a2cfe336c SHA1 7f104eaeca0f0f81f50041958f602a7d29beac32 SHA256 203168b1d78ed3a0ac0618ae72a89be678e15b0b6e3cae67447a6109405f5d1c +MD5 f6029ff6a814add04ef20430aa1ceddb ntp-4.2.2_p4.ebuild 3826 +RMD160 e654dd8831545dd73fbf202927be443a2cfe336c ntp-4.2.2_p4.ebuild 3826 +SHA256 203168b1d78ed3a0ac0618ae72a89be678e15b0b6e3cae67447a6109405f5d1c ntp-4.2.2_p4.ebuild 3826 +EBUILD ntp-4.2.4.ebuild 3828 RMD160 16f3a64bf70d764762ed6d98bdfff3ea34bd6a07 SHA1 388fd907ac310547f3a669e23fa3d389ebd4ce35 SHA256 495a84862be5a609e7e5f0c46b7e6fad88a09b8e9694d14138043c35a7458043 +MD5 7820cb533679dbba167f348cd7a2f7cd ntp-4.2.4.ebuild 3828 +RMD160 16f3a64bf70d764762ed6d98bdfff3ea34bd6a07 ntp-4.2.4.ebuild 3828 +SHA256 495a84862be5a609e7e5f0c46b7e6fad88a09b8e9694d14138043c35a7458043 ntp-4.2.4.ebuild 3828 +MISC ChangeLog 13580 RMD160 4ab48e0679672fd0a85dce763445f5ecef77798e SHA1 cdd5c7333304ab0cd96879a37e55098669081029 SHA256 c9200dd5027550642596483425961984d9a8191da831f838e3b158368bcdd348 +MD5 ed38dba20ff7a466c24a8067cb9513d8 ChangeLog 13580 +RMD160 4ab48e0679672fd0a85dce763445f5ecef77798e ChangeLog 13580 +SHA256 c9200dd5027550642596483425961984d9a8191da831f838e3b158368bcdd348 ChangeLog 13580 MISC metadata.xml 607 RMD160 f005595b482e97659d0dc42cf0af1c56d88ec3a7 SHA1 67aab04a0a7021caf7a78d9094315f3595f47409 SHA256 14dc7da8f6d0ccaafa8408e289acd1a23f7adff23ef45c2fdd0d8b89d97d0222 MD5 8d52071ded7c5d37f4823ac9a4fffb8e metadata.xml 607 RMD160 f005595b482e97659d0dc42cf0af1c56d88ec3a7 metadata.xml 607 @@ -59,7 +59,7 @@ SHA256 0712d606ca90d45e71dd9b4cf2a675cbf6939f08d965c5fdd0e0cb7799098d0e files/di -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.1 (GNU/Linux) -iD8DBQFFl81G8bi6rjpTunYRAg01AJ9VsAbqIymbzcXTjzprZxrQgTHxigCfZ72W -IaZN7fCD/O8Yub/B7OewBvY= -=R3P/ +iD8DBQFFo9YZ8bi6rjpTunYRAnQUAJ9R8adtXrJH0n3oLBo9vQzgiZvp9gCgi00/ +lei5qRJLDVFmZjPSW69Wxvo= +=aIHE -----END PGP SIGNATURE----- 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