]> git.ipfire.org Git - thirdparty/util-linux.git/commit
logger: add --socket-errors compatibility option
authorSami Kerola <kerolasa@iki.fi>
Sun, 15 Feb 2015 09:50:23 +0000 (09:50 +0000)
committerKarel Zak <kzak@redhat.com>
Mon, 16 Feb 2015 10:08:24 +0000 (11:08 +0100)
commitd77dc29e6e18d39b1845282e8039ac7117f3bd1c
tree2462168bb11062786bee733751a19daef9b353a3
parent6340e9137fba62560ab09cb855d665495aba4322
logger: add --socket-errors compatibility option

Hello,

Depending viewpoint this change is either regression fix, or
re-regression in context of none-systemd init.  I ack the change is sent
very late to be part of v2.26, but then again the excess noise was found
only because of -rc1 was tested in sysvinit environment.  IMHO it would
contradict purpose of having rc's if faults will not lead to fixes.

I also want to point out the sysvinit scripts are broken, not the
logger(1), but getting them corrected is practically impossible.
Assuming sysvinit script are further developed by various teams and
distributions who maintain them they should use --socket-error=on in
future, and write scripts that pass without noise.  Meanwhile trying to
be clever when to silence errors seems like a reasonable thing to do.

--->8----
From: Sami Kerola <kerolasa@iki.fi>
Date: Sat, 14 Feb 2015 19:05:55 +0000
Subject: [PATCH] logger: add --socket-errors compatibility option

Now when logger(1) has stopped using openlog() for Unix sockets, in
commit mentioned in reference, the lack of /dev/log detected will report
error accordingly.  According to Gabriele Balducci this makes sysvinit
style boot scripts to print a lot of errors.  So make the logger to
detect whether it should be in compatibility mode, and not report errors
if logging device is missing.  That imitates behavior of glibc openlog().

To allow full control to users the /dev/log error messages can be forced
to on or off.  The automatic error messaging is explained in manual page.

Reference: 1d57503378bdcd838365d625f6d2d0a09da9c29d
Reported-by: Gabriele Balducci <balducci@units.it>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
misc-utils/logger.1
misc-utils/logger.c