54 lines
1.7 KiB
Desktop File
54 lines
1.7 KiB
Desktop File
# /lib/systemd/system/klog.service
|
|
#
|
|
# This file is part of package systemd.
|
|
#
|
|
# Copyright (c) 2011 SuSE LINUX Products GmbH, Germany.
|
|
# Author: Werner Fink
|
|
# Please send feedback to http://www.suse.de/feedback
|
|
#
|
|
# Description:
|
|
#
|
|
# Create the well known /var/log/boot.msg
|
|
# By using dmesg(1) the normal kernel and boot messages handled
|
|
# by systemd will not disappear. The character device /dev/tty10
|
|
# will be created by udevd and therefore should exists only if
|
|
# virtual consoles are available.
|
|
#
|
|
|
|
[Unit]
|
|
Description=Early Kernel Boot Messages
|
|
DefaultDependencies=no
|
|
Requires=local-fs.target
|
|
After=local-fs.target
|
|
Before=shutdown.target
|
|
RefuseManualStart=true
|
|
ConditionPathIsDirectory=/var/log
|
|
|
|
[Service]
|
|
# added automatically, for details please see
|
|
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
|
ProtectSystem=full
|
|
ProtectHome=true
|
|
ProtectHostname=true
|
|
ProtectKernelTunables=true
|
|
ProtectKernelModules=true
|
|
ProtectControlGroups=true
|
|
RestrictRealtime=true
|
|
# end of automatic additions
|
|
Type=oneshot
|
|
StandardError=tty
|
|
StandardOutput=tty
|
|
RemainAfterExit=yes
|
|
Environment=CONSOLE_LOGLEVEL=
|
|
Environment=KLOG_CONSOLE=10
|
|
EnvironmentFile=-/etc/sysconfig/boot
|
|
ExecStart=/bin/sh -c "test -s /var/log/boot.msg && /bin/mv -f /var/log/boot.msg /var/log/boot.omsg || :"
|
|
ExecStart=/bin/sh -c "/bin/dmesg -r > /var/log/boot.msg"
|
|
ExecStart=/bin/sh -c "test -s /dev/shm/initrd.msg -a -O /dev/shm/initrd.msg && /bin/cat /dev/shm/initrd.msg >> /var/log/boot.msg || :"
|
|
ExecStart=/bin/sh -c "test -c /dev/tty$KLOG_CONSOLE && /usr/bin/setlogcons $KLOG_CONSOLE || :"
|
|
ExecStart=/bin/sh -c "if test -n \"$CONSOLE_LOGLEVEL\" ; then /bin/dmesg -n $CONSOLE_LOGLEVEL || : ; fi"
|
|
|
|
[Install]
|
|
WantedBy=basic.target
|
|
Alias=bootmsg.service
|