Bug 169787 - net/openntpd stomps on ntpdate in rcorder(8)
Summary: net/openntpd stomps on ntpdate in rcorder(8)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Christian Weisgerber
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-11 17:30 UTC by Brian Conway
Modified: 2012-07-17 15:50 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Conway 2012-07-11 17:30:01 UTC
In base, the rc.d script for ntpd includes a REQUIRE: ntpdate, which allows ntpdate to initially set the time, followed by running ntpd.

It appears openntpd's rc.d script has no such REQUIRE:, and I frequently find that openntpd will start first, and ntpdate cannot run and set the initial time. This can be a pain on a system that is significantly skewed on cold boot.

Fix: 

Update /usr/local/etc/rc.d/openntpd to include:

# REQUIRE: DAEMON ntpdate

For reference, ntpd's rc-script includes all of the following (may not be relevant):

# REQUIRE: DAEMON ntpdate cleanvar devfs

Thanks.
How-To-Repeat: Include in rc.conf, after installing openntpd port:

ntpdate_enable="YES"
ntpdate_hosts="us.pool.ntp.org"
openntpd_enable="YES"

Boot the system.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2012-07-12 05:23:34 UTC
Responsible Changed
From-To: freebsd-ports-bugs->naddy

Fix synopsis and assign.
Comment 2 Christian Weisgerber freebsd_committer 2012-07-17 15:35:58 UTC
State Changed
From-To: open->closed

Instead of running ntpdate, you should really just set openntpd_flags="-s" 
to make openntpd set the time immediately at startup. 

However, I agree that the combination should be possible, so I have 
committed the change.  Thanks!
Comment 3 dfilter service freebsd_committer 2012-07-17 15:36:01 UTC
Author: naddy
Date: Tue Jul 17 14:35:46 2012
New Revision: 301005
URL: http://svn.freebsd.org/changeset/ports/301005

Log:
  In the rc.d script, have ntpd start after ntpdate.
  
  PR:		169787
  Submitted by:	Brian Conway <bugs@zxvf.us>

Modified:
  head/net/openntpd/Makefile
  head/net/openntpd/files/openntpd.in

Modified: head/net/openntpd/Makefile
==============================================================================
--- head/net/openntpd/Makefile	Tue Jul 17 14:35:18 2012	(r301004)
+++ head/net/openntpd/Makefile	Tue Jul 17 14:35:46 2012	(r301005)
@@ -7,7 +7,7 @@
 
 PORTNAME=	openntpd
 PORTVERSION=	4.6
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	2
 CATEGORIES=	net
 MASTER_SITES=	${MASTER_SITE_OPENBSD}

Modified: head/net/openntpd/files/openntpd.in
==============================================================================
--- head/net/openntpd/files/openntpd.in	Tue Jul 17 14:35:18 2012	(r301004)
+++ head/net/openntpd/files/openntpd.in	Tue Jul 17 14:35:46 2012	(r301005)
@@ -3,7 +3,7 @@
 # $FreeBSD$
 #
 # PROVIDE: openntpd
-# REQUIRE: DAEMON
+# REQUIRE: DAEMON ntpdate
 # BEFORE:  LOGIN
 # KEYWORD: nojail shutdown
 #
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"