Date: Fri, 5 May 2000 00:42:06 -0700 (PDT) From: Stephen Beitzel <sbeitzel@foobie.net> To: freebsd-questions@FreeBSD.ORG Subject: xntpd startup duplication Message-ID: <200005050742.AAA00400@foobie.net>
next in thread | raw e-mail | index | archive | help
I have noticed that when I start up my FreeBSD (3.4) box, xntpd gets started
twice. The second time, it fails to run (gracefully) and writes a message to
the console saying that the port it wanted to use was already in use by
something else. (Duh. The first instance of xntpd.)
Anyway, I finally got curious and went looking through the /etc/rc* files.
It turns out that /etc/rc and /etc/rc.network both invoke xntpd. The test
is different, though:
From /etc/rc:
if [ "X${xntpd_enable}" != X"NO" ]; then
echo -n ' xntpd'; xntpd
fi
From /etc/rc.network:
if [ "X${xntpd_enable}" = X"YES" ]; then
echo -n ' xntpd'; ${xntpd_program} ${xntpd_flags}
fi
A couple of thoughts occured to me.
1) It seems silly to me to have this test occur in two places. Probably,
whoever the maintainer is for the rc files ought to remove it from
one of them.
2) If one is going to perform the same test in two locations, one really
ought to test against the same constant. With the current configuration,
I can add a line to /etc/rc.conf setting xntpd_enable to "N" and that
will run the executable "xntpd" with no flags. That's a surprising
result, particularly if one looks at rc.network. If one wanted to run
xntpd with some parameters, one would have to modify /etc/rc, since
setting xntpd_enable to "YES" would invoke xntpd from /etc/rc and then
try to invoke it again from /etc/rc.network -- causing the second process
to exit with a message.
Is this the proper place to raise concerns like this?
Steve
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005050742.AAA00400>
