Bug 28786 - a fix for comments that are not allowed in ntp step-tickers file
a fix for comments that are not allowed in ntp step-tickers file
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: ntp (Show other bugs)
7.0
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Preston Brown
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-22 01:53 EST by Landon Curt Noll
Modified: 2007-04-18 12:31 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-22 01:53:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Landon Curt Noll 2001-02-22 01:53:10 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.17-14 i686)


The step-tickers file, as used by the /etc/init.d/ntpd startup file cannot
contain
any comments.  A fix is supplied to correct this problem.

Reproducible: Always
Steps to Reproduce:
1.Add a line of the form:
	# this is a comment
  to /etc/ntp/step-tickers
2./etc/init.d/ntpd restart
3.
	

Actual Results:  a syntax error is generated by ntpdate because the
comments are
not removed.

Expected Results:  comments have no effect

If you apply this patch, the problem will be solved:

*** /etc/rc.d/init.d/ntpd	2001/02/22 06:41:34	1.1
--- /etc/rc.d/init.d/ntpd	2001/02/22 06:49:07
***************
*** 23,29 ****
  	# Adjust time to make life easy for ntpd
  	if [ -f /etc/ntp/step-tickers ]; then
  		echo -n "Syncing time for ntpd. "
! 		/usr/sbin/ntpdate -s -b -p 8 -u `cat /etc/ntp/step-tickers`
  	fi
          # Start daemons.
          echo -n "Starting ntpd: "
--- 23,30 ----
  	# Adjust time to make life easy for ntpd
  	if [ -f /etc/ntp/step-tickers ]; then
  		echo -n "Syncing time for ntpd. "
! 		/usr/sbin/ntpdate -s -b -p 8 -u \
! 			`/bin/sed -e 's/#.*//' /etc/ntp/step-tickers`
  	fi
          # Start daemons.
          echo -n "Starting ntpd: "
Comment 1 Preston Brown 2001-03-05 10:15:26 EST
changed in 4.0.99k-12 and later.  Good idea.

Note You need to log in before you can comment on or make changes to this bug.