Don't listen to /proc/kmsg, because Docker doesn't mount it for us.
This avoids:
* Starting syslog-ng ...
Error opening file for reading;
filename='/proc/kmsg', error='Operation not permitted (1)'
Error initializing message pipeline;
* start-stop-daemon: failed to start `/usr/sbin/syslog-ng'
* Failed to start syslog-ng [ !! ]
* ERROR: syslog-ng failed to start
Also add an explicit source listening to /dev/log. I don't have this
on my host system, and that syslog-ng creates /dev/log just fine, but
my containers seem to need an explicit listing here or they don't
create /dev/log.
Reported-by: Oleg Terenchuk <litwol@litwol.com>
# Disable logging to tty12
RUN sed -i 's/^\([^#].*console_all.*\)/#\1/' /etc/syslog-ng/syslog-ng.conf
+# Disable the system source (/proc/kmsg)
+RUN sed -i 's/^\(.*\)system(); \(.*\)/\1\2/' /etc/syslog-ng/syslog-ng.conf
+
+# Enable /dev/log
+RUN sed -i 's|^\(.* internal();\)\(.*\)|\1 unix-stream("/dev/log");\2|' /etc/syslog-ng/syslog-ng.conf
+
# Log boot process to /var/log/rc.log
RUN sed -i 's/^#\(rc_logger="YES"\)$/\1/' /etc/rc.conf