[syslog-ng] [PATCH 0/2] systemd enhancements

Gergely Nagy algernon at balabit.hu
Fri Apr 20 20:00:44 CEST 2012


The two patches that follow improve syslog-ng's support for
systemd-enabled platforms. The first patch simply teaches the system()
source to prefer /run/systemd/journal/syslog over /dev/log if running
under systemd.

That alone makes configs that use system() work under both sysvinit
and systemd without any change at all to the config.

However, for configs that use /dev/log hard-coded, the upgrade path
isn't that smooth. In that case, we still check whether running under
systemd, and if so, but we couldn't accept any of the offered fds, we
check again with /run/systemd/journal/syslog as the filename, and
replace the hard-coded one if the other filename worked.

The second patch implements the above - I'm not entirely sold on the
idea, and haven't explored the possible side-effects yet, but I
believe it's reasonably safe for the vast majority of cases. For now,
the second patch is mostly meant as a proposal, and will need a review
before it can be considered for a merge.




More information about the syslog-ng mailing list