Subject: Re: bin/13591: rcorder starts syslog before named
To: NetBSD GNATS submissions and followups <gnats-bugs@gnats.netbsd.org>
From: Luke Mewburn <lukem@wasabisystems.com>
List: netbsd-bugs
Date: 07/31/2001 11:54:19
On Sun, Jul 29, 2001 at 06:03:39PM -0400, Greg A. Woods wrote:
> [ On Sunday, July 29, 2001 at 20:44:22 (+0200), Anthony Mallet wrote: ]
> > Subject: bin/13591: rcorder starts syslog before named
> >
> > Maybe named could be started earlier ?
>
> named uses syslog (by default, anyway), so syslog must start first.
>
> Custom syslog configurations using "@machine" should be done either with
> an entry in /etc/hosts if necessary.
>
> Note that syslogd now calls getaddrinfo with the value given for
> "machine" as the nodename parameter, and:
>
> A non-NULL nodename string can be either a node name or a numeric
> host address string (i.e., a dotted-decimal IPv4 address or an IPv6 hex
> address).
I concur with Greg here.
There are many good reasons to start syslogd before named, as
enumerated by many people.
If you change the rcordering on your system so named starts before
syslogd, you'll have to ensure that named isn't logging via syslog.
Anthony provided a suggested patch, which I'm a bit leery to
incorporate because it would cause syslogd to attempt to look
up an unknown host name each time a message was attempted to be
forwarded to a host with an unknown name. This could result in
pathological behaviour and unexpected delays in logging waiting for
hostname lookups.
A simpler solution would be for Anthony to install a script which
forced syslogd to reload its config file after named started.
Something like the following (untested and not perfect) script
installed as /etc/rc.d/reloadsyslogd might help:
#!/bin/sh
# PROVIDE: reloadsyslogd
# REQUIRE: named
# BEFORE: DAEMON
. /etc/rc.subr
name="reloadsyslogd"
start_cmd="/etc/rc.d/syslogd reload"
stop_cmd=":"
Luke.