mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-02 15:41:48 +00:00
* Start klogd to send kernel log messages to syslogd.
svn path=/nixos/trunk/; revision=11781
This commit is contained in:
parent
6f64c4ee0d
commit
c44475b085
@ -79,6 +79,12 @@ let
|
||||
inherit config;
|
||||
})
|
||||
|
||||
# Klogd.
|
||||
(import ../upstart-jobs/klogd.nix {
|
||||
inherit (pkgs) sysklogd writeText;
|
||||
inherit config;
|
||||
})
|
||||
|
||||
# The udev daemon creates devices nodes and runs programs when
|
||||
# hardware events occur.
|
||||
(import ../upstart-jobs/udev.nix {
|
||||
|
26
upstart-jobs/klogd.nix
Normal file
26
upstart-jobs/klogd.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{sysklogd, writeText, config}:
|
||||
|
||||
let
|
||||
|
||||
klogdCmd = "${sysklogd}/sbin/klogd -c 1 -2 -k $(dirname $(readlink -f /var/run/booted-system/kernel))/System.map";
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
name = "klogd";
|
||||
|
||||
job = ''
|
||||
description "Kernel log daemon"
|
||||
|
||||
start on syslogd
|
||||
stop on shutdown
|
||||
|
||||
start script
|
||||
# !!! this hangs for some reason (it blocks reading from
|
||||
# /proc/kmsg).
|
||||
#${klogdCmd} -o
|
||||
end script
|
||||
|
||||
respawn ${klogdCmd} -n
|
||||
'';
|
||||
}
|
@ -3,7 +3,10 @@
|
||||
let
|
||||
|
||||
syslogConf = writeText "syslog.conf" ''
|
||||
*.* /dev/tty10
|
||||
kern.warning;*.err;authpriv.none /dev/tty10
|
||||
|
||||
# Send emergency messages to all users.
|
||||
*.emerg *
|
||||
|
||||
# "local1" is used for dhcpd messages.
|
||||
local1.* -/var/log/dhcpd
|
||||
@ -20,7 +23,10 @@ in
|
||||
|
||||
{
|
||||
name = "syslogd";
|
||||
|
||||
job = ''
|
||||
description "Syslog daemon"
|
||||
|
||||
start on udev
|
||||
stop on shutdown
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user