RCng/NTP Catch-22

Mike Makonnen mtm at identd.net
Thu Oct 21 08:06:04 PDT 2004


On Wed, Oct 20, 2004 at 03:03:29PM -0700, Kevin Oberman wrote:
> 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 don't see why devfs requires LOGIN. It only requires that rcconf and
the /usr filesystem be available. Also, since it appears that it
may be needed by some daemons it should be set to run before any servers
are started. I think the attached (untested) patch should work.

Cheers.
-- 
Mike Makonnen  | GPG-KEY: http://www.identd.net/~mtm/mtm.asc
mtm at identd.net | Fingerprint: AC7B 5672 2D11 F4D0 EBF8  5279 5359 2B82 7CD4 1F55
mtm at FreeBSD.Org| FreeBSD - Unleash the Daemon !
-------------- next part --------------
Index: etc/rc.d/devfs
===================================================================
RCS file: /home/ncvs/src/etc/rc.d/devfs,v
retrieving revision 1.9
diff -u -r1.9 devfs
--- etc/rc.d/devfs	7 Oct 2004 13:55:25 -0000	1.9
+++ etc/rc.d/devfs	21 Oct 2004 15:03:33 -0000
@@ -4,8 +4,8 @@
 #
 
 # PROVIDE: devfs
-# REQUIRE: LOGIN
-# BEFORE:  securelevel
+# REQUIRE: rcconf mountcritremote
+# BEFORE:  SERVERS securelevel
 # KEYWORD: nojail
 
 . /etc/rc.subr


More information about the freebsd-current mailing list