* Start klogd to send kernel log messages to syslogd.

svn path=/nixos/trunk/; revision=11781
This commit is contained in:
Eelco Dolstra 2008-05-08 13:47:44 +00:00
parent 6f64c4ee0d
commit c44475b085
3 changed files with 39 additions and 1 deletions

View File

@ -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
View 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
'';
}

View File

@ -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