mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-23 19:05:37 +00:00
Direct syslog to log to /var/run/syslog.vsock on mac
Avoid doing this on non-Docker-for-{Mac,Win} editions (which don't run vsudd) by checking for vsudd.pid and avoid doing it on Docker-for-Win (for now) by checking for /sys/bus/vmbus (as /etc/init.d/vsudd does too). Ideally we would just check for /var/run/syslog.vsock but this may not have arrived yet (typically vsudd is now started immediately prior to syslog and it forks via start-stop-daemon and thus before it creates the socket). Since syslogd will reopen as needed we don't want to delay boot either here or in the vsudd initscript to await the arrival of the socket. Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
parent
ad7f4c74b2
commit
916d920bfb
5
alpine/etc/conf.d/syslog
Normal file
5
alpine/etc/conf.d/syslog
Normal file
@ -0,0 +1,5 @@
|
||||
# Would prefer to check [ -S /var/run/syslog.vsock ] but it doesn't
|
||||
# always exist by the time we get here starts.
|
||||
if [ -e /var/run/vsudd.pid -a ! -d /sys/bus/vmbus ] ; then
|
||||
SYSLOGD_OPTS="-R local:/var/run/syslog.vsock"
|
||||
fi
|
Loading…
Reference in New Issue
Block a user