From owner-freebsd-current@FreeBSD.ORG Thu Oct 21 21:05:11 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0497716A4CE for ; Thu, 21 Oct 2004 21:05:11 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id 905A143D3F for ; Thu, 21 Oct 2004 21:05:10 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (harmony.village.org [10.0.0.6]) by harmony.village.org (8.13.1/8.13.1) with ESMTP id i9LL38CT024136; Thu, 21 Oct 2004 15:03:09 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 21 Oct 2004 15:03:30 -0600 (MDT) Message-Id: <20041021.150330.105171571.imp@bsdimp.com> To: oberman@es.net From: "M. Warner Losh" In-Reply-To: <20041020220329.64CE75D04@ptavv.es.net> References: <20041020220329.64CE75D04@ptavv.es.net> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org Subject: Re: RCng/NTP Catch-22 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Oct 2004 21:05:11 -0000 In message: <20041020220329.64CE75D04@ptavv.es.net> "Kevin Oberman" writes: : I have run into a messy issue with ntp on a V5 or current system. I have : kludged around it, but the problem really needs to be fixed. : : ntpd uses symlinked devices to talk to the reference clock (if there is : one). : lrwxr-xr-x 1 root wheel 10 Jul 1 14:36 /dev/pps1 -> /dev/cuaa1 : lrwxr-xr-x 1 root wheel 10 Jul 1 14:36 /dev/true1 -> /dev/cuaa1 : : While I really wish ntpd did not do this, it does and it's in the base : system. : : Since /etc/rc.d/ntpd contains: : BEFORE: LOGIN : and /etc/rc.d/devfs contains: : REQUIRE: LOGIN : I don't see a clean way to create the symlinks at boot time. If the : devices are not present when ntp starts, it never looks again. : : I have kludged this by adding the symlinks in the ntpd script, but this : is really ugly. There should be a better way of doing it. Ideally, ntp : should read the device(s) to use from ntp.conf (and quit overloading : the loopback address space while we are at it). Barring this, there : needs to be a way of getting th devices created before nptd is started. : : Any of the RCng folks have any suggestions? We solved this problem here by doing the following: # PROVIDE: devfs # REQUIRE: LOGIN # BEFORE: securelevel ntpd # KEYWORD: FreeBSD nojail But that's suboptimal. devfs should start as soon after fsck has happened as possible, imho. I don't think the REQUIRE: LOGIN line is the right one to use, but rather 'mountcritlocal' would be better. In fact, I have no idea why the above works for us here! # PROVIDE: devfs # REQUIRE: mountcritlocal # BEFORE: ipfilter var Seems like the right order to me. Or even more radical: # PROVIDE: devfs # REQUIRE: root # BEFORE: mountcritlocal Since just about anything after root could use a potentially aliased device. Warner