What would be really cool is if more config files could
do 'includes' so that you could have a syslogd.local.conf
wher eall your local entries could be.

In addition you could make it
look in /usr/local/etc/syslogd.conf for loging requirments for
packages.


Hmmm... glancing through syslogd.c, it doesn't look
like it would be hard to alter it to support multiple
-f options.  In that case, just add the following
to rc.conf (or /etc/rc.d/syslogd, I suppose):
  if [ -e /etc/syslog.local ] then
    syslogd_args="$syslogd_args -f /etc/syslog.local"
  fi

for f in /usr/local/etc/syslogd.d/*

do

syslogd_args="$syslogd_args -f $f"

done

This largely removes the need for include handling.
It doesn't allow you to override or remove
existing entries, though.  One approach that
preserves backward compatibility would be
to allow optional line numbers, with duplicates
overriding earlier entries.  That requires some
non-trivial code changes to support, but it
shouldn't be too hard.

There's also considerable precedent for using
cpp or m4 to preprocess configuration files.
Either supports file inclusions, conditionals,
etc.  It's generally not too hard to support
this: it usually just involves replacing
fopen() with popen().

Tim Kientzle



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to