mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 12:13:33 +08:00
syslog: enable kmsg bridge by default and enable syslogging for early boot services
This commit is contained in:
parent
0206d45866
commit
52f319b293
@ -185,7 +185,7 @@ dist_systemunit_DATA = \
|
|||||||
units/systemd-initctl.socket \
|
units/systemd-initctl.socket \
|
||||||
units/systemd-logger.socket \
|
units/systemd-logger.socket \
|
||||||
units/systemd-shutdownd.socket \
|
units/systemd-shutdownd.socket \
|
||||||
units/systemd-kmsg-syslogd.socket \
|
units/syslog.socket \
|
||||||
units/dev-hugepages.automount \
|
units/dev-hugepages.automount \
|
||||||
units/dev-hugepages.mount \
|
units/dev-hugepages.mount \
|
||||||
units/dev-mqueue.automount \
|
units/dev-mqueue.automount \
|
||||||
@ -1048,10 +1048,11 @@ install-data-hook:
|
|||||||
rm -f session && \
|
rm -f session && \
|
||||||
$(LN_S) $(pkgsysconfdir)/session session )
|
$(LN_S) $(pkgsysconfdir)/session session )
|
||||||
( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
|
( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
|
||||||
rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket && \
|
rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket syslog.socket && \
|
||||||
$(LN_S) ../systemd-logger.socket systemd-logger.socket && \
|
$(LN_S) ../systemd-logger.socket systemd-logger.socket && \
|
||||||
$(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
|
$(LN_S) ../systemd-initctl.socket systemd-initctl.socket && \
|
||||||
$(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket )
|
$(LN_S) ../systemd-shutdownd.socket systemd-shutdownd.socket && \
|
||||||
|
$(LN_S) ../syslog.socket syslog.socket )
|
||||||
( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
|
( cd $(DESTDIR)$(systemunitdir)/runlevel1.target.wants && \
|
||||||
rm -f systemd-update-utmp-runlevel.service && \
|
rm -f systemd-update-utmp-runlevel.service && \
|
||||||
$(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
|
$(LN_S) ../systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service )
|
||||||
|
@ -15,4 +15,5 @@ Before=local-fs.target shutdown.target remount-rootfs.service quotacheck.service
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=no
|
RemainAfterExit=no
|
||||||
ExecStart=@rootlibexecdir@/systemd-fsck
|
ExecStart=@rootlibexecdir@/systemd-fsck
|
||||||
|
StandardOutput=syslog
|
||||||
FsckPassNo=1
|
FsckPassNo=1
|
||||||
|
@ -16,3 +16,4 @@ Before=local-fs.target shutdown.target
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=no
|
RemainAfterExit=no
|
||||||
ExecStart=@rootlibexecdir@/systemd-fsck %f
|
ExecStart=@rootlibexecdir@/systemd-fsck %f
|
||||||
|
StandardOutput=syslog
|
||||||
|
@ -15,6 +15,7 @@ Before=basic.target shutdown.target udev.service
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=/sbin/hwclock --systz
|
ExecStart=/sbin/hwclock --systz
|
||||||
|
StandardOutput=syslog
|
||||||
|
|
||||||
# Note the weird semantics if hwclock and the kernel here: the first
|
# Note the weird semantics if hwclock and the kernel here: the first
|
||||||
# settimeofday() invocation from userspace is special and may be used
|
# settimeofday() invocation from userspace is special and may be used
|
||||||
|
@ -16,6 +16,7 @@ ConditionPathExists=/sbin/quotacheck
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=@rootlibexecdir@/systemd-quotacheck
|
ExecStart=@rootlibexecdir@/systemd-quotacheck
|
||||||
|
StandardOutput=syslog
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=local-fs.target
|
WantedBy=local-fs.target
|
||||||
|
@ -16,6 +16,7 @@ ConditionPathExists=/sbin/quotaon
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=/sbin/quotaon -aug
|
ExecStart=/sbin/quotaon -aug
|
||||||
|
StandardOutput=syslog
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=local-fs.target
|
WantedBy=local-fs.target
|
||||||
|
@ -16,3 +16,4 @@ Before=local-fs.target shutdown.target
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=/bin/mount / -o remount
|
ExecStart=/bin/mount / -o remount
|
||||||
|
StandardOutput=syslog
|
||||||
|
@ -16,3 +16,4 @@ Before=basic.target shutdown.target
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=/sbin/sysctl -e -q -p /etc/sysctl.conf
|
ExecStart=/sbin/sysctl -e -q -p /etc/sysctl.conf
|
||||||
|
StandardOutput=syslog
|
||||||
|
27
units/syslog.socket
Normal file
27
units/syslog.socket
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# This file is part of systemd.
|
||||||
|
#
|
||||||
|
# systemd is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
# See systemd.special(7) for details
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Syslog Socket
|
||||||
|
DefaultDependencies=no
|
||||||
|
Before=sockets.target
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenDatagram=/dev/log
|
||||||
|
SocketMode=0666
|
||||||
|
|
||||||
|
# The service we activate on incoming traffic is
|
||||||
|
# systemd-kmsg-syslogd.service. That doesn't mean however, that this
|
||||||
|
# is the main syslog daemon in the system. Another syslog
|
||||||
|
# implementation (which might be started via on-boot or another
|
||||||
|
# non-socket activation) can take over possession of the socket and
|
||||||
|
# terminate systemd-kmsg-syslogd. It could also simply replace the
|
||||||
|
# socket in the file system, and leave systemd-kmsg-syslogd untouched.
|
||||||
|
|
||||||
|
Service=systemd-kmsg-syslogd.service
|
@ -8,7 +8,7 @@
|
|||||||
# See systemd.special(7) for details
|
# See systemd.special(7) for details
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=systemd /dev/initctl Compatibility Daemon
|
Description=/dev/initctl Compatibility Daemon
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
# See systemd.special(7) for details
|
# See systemd.special(7) for details
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=systemd /dev/initctl Compatibility Socket
|
Description=/dev/initctl Compatibility Socket
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
Before=sockets.target
|
Before=sockets.target
|
||||||
|
|
||||||
|
@ -14,3 +14,4 @@ DefaultDependencies=no
|
|||||||
[Service]
|
[Service]
|
||||||
ExecStart=@rootlibexecdir@/systemd-kmsg-syslogd
|
ExecStart=@rootlibexecdir@/systemd-kmsg-syslogd
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
|
Sockets=syslog.socket
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
# This file is part of systemd.
|
|
||||||
#
|
|
||||||
# systemd is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
|
|
||||||
# See systemd.special(7) for details
|
|
||||||
|
|
||||||
[Unit]
|
|
||||||
Description=Syslog Socket
|
|
||||||
DefaultDependencies=no
|
|
||||||
Before=sockets.target
|
|
||||||
|
|
||||||
[Socket]
|
|
||||||
ListenDatagram=/dev/log
|
|
||||||
SocketMode=0666
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=basic.target
|
|
@ -8,9 +8,9 @@
|
|||||||
# See systemd.special(7) for details
|
# See systemd.special(7) for details
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=systemd Logging Daemon
|
Description=Logging Daemon
|
||||||
Wants=syslog.target
|
DefaultDependencies=no
|
||||||
After=syslog.target @SPECIAL_SYSLOG_SERVICE@
|
After=syslog.socket
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=@rootlibexecdir@/systemd-logger
|
ExecStart=@rootlibexecdir@/systemd-logger
|
||||||
|
@ -8,7 +8,9 @@
|
|||||||
# See systemd.special(7) for details
|
# See systemd.special(7) for details
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=systemd Logging Socket
|
Description=Logging Socket
|
||||||
|
DefaultDependencies=no
|
||||||
|
Before=sockets.target
|
||||||
|
|
||||||
[Socket]
|
[Socket]
|
||||||
ListenStream=@/org/freedesktop/systemd1/logger
|
ListenStream=@/org/freedesktop/systemd1/logger
|
||||||
|
@ -16,3 +16,4 @@ Before=local-fs.target shutdown.target
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=@rootlibexecdir@/systemd-remount-api-vfs
|
ExecStart=@rootlibexecdir@/systemd-remount-api-vfs
|
||||||
|
StandardOutput=syslog
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
# See systemd.special(7) for details
|
# See systemd.special(7) for details
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=systemd Delayed Shutdown Daemon
|
Description=Delayed Shutdown Daemon
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
# See systemd.special(7) for details
|
# See systemd.special(7) for details
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=systemd Delayed Shutdown Socket
|
Description=Delayed Shutdown Socket
|
||||||
DefaultDependencies=no
|
DefaultDependencies=no
|
||||||
Before=sockets.target
|
Before=sockets.target
|
||||||
|
|
||||||
|
@ -16,3 +16,4 @@ Before=basic.target shutdown.target
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
ExecStart=@rootlibexecdir@/systemd-vconsole-setup
|
ExecStart=@rootlibexecdir@/systemd-vconsole-setup
|
||||||
|
StandardOutput=syslog
|
||||||
|
Loading…
Reference in New Issue
Block a user