nixpkgs/upstart-jobs/klogd.nix
Eelco Dolstra c44475b085 * Start klogd to send kernel log messages to syslogd.
svn path=/nixos/trunk/; revision=11781
2008-05-08 13:47:44 +00:00

27 lines
449 B
Nix

{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
'';
}