public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Rob Snow" <lists@dympna.com>
To: "Gentoo-Dev" <gentoo-dev@gentoo.org>
Subject: [gentoo-dev] Patch to /etc/init.d/ntpd to set tickadj if needed
Date: Mon, 7 Jul 2003 15:15:12 -0600	[thread overview]
Message-ID: <20030707211112.M17813@dympna.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 569 bytes --]

Please excuse me if this is the wrong list to send this to, this is my first submission to  
Gentoo since I recently installed. 
  
This patch adds a feature to set and save a tick value for machines that do not keep  
good time with the default tick value.  This does not adjust the value itself, it simply  
keeps the current value between start/stop and reboots.  I believe this might be quite 
useful for those with bad tick values due to overclocking or just plain broken 
hardware.  It doesn't have any adverse effect on those who don't need the change. 
 
-Rob 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ntpd-patch.diff --]
[-- Type: text/x-diff; name="ntpd-patch.diff", Size: 614 bytes --]

--- ntpd	2003-07-01 12:19:46.000000000 -0500
+++ /shared/ntpd-tickadj	2003-07-06 17:26:12.000000000 -0500
@@ -20,6 +20,10 @@
 start() {
 	checkconfig || return $?
 
+	if [ -f /etc/ntp/tickadj.conf ] ; then
+		/usr/bin/tickadj `cat /etc/ntp/tickadj.conf`
+	fi
+
 	if [ -n "${NTPDATE_CMD}" ] ; then
 		ebegin "Initializing clock via ${NTPDATE_CMD}"
 		${NTPDATE_CMD} ${NTPDATE_OPTS} > /dev/null
@@ -35,6 +39,7 @@
 }
 
 stop() {
+	/usr/bin/tickadj | sed -e "s/tick\ =\ //g" >/etc/ntp/tickadj.conf
 	ebegin "Stopping ntpd"
 	start-stop-daemon --stop --quiet --pidfile /var/run/ntpd.pid
 	eend $? "Failed to stop ntpd"

[-- Attachment #3: Type: text/plain, Size: 37 bytes --]

--
gentoo-dev@gentoo.org mailing list

             reply	other threads:[~2003-07-07 21:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-07 21:15 Rob Snow [this message]
2003-07-07 21:40 ` [gentoo-dev] Patch to /etc/init.d/ntpd to set tickadj if needed George Shapovalov
2003-07-07 22:41   ` Rob Snow

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030707211112.M17813@dympna.com \
    --to=lists@dympna.com \
    --cc=gentoo-dev@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox