2009-03-06 13:27:23 +01:00
|
|
|
{pkgs, config, ...}:
|
2008-05-08 15:47:44 +02:00
|
|
|
|
2009-03-06 13:27:23 +01:00
|
|
|
###### implementation
|
2008-05-08 15:47:44 +02:00
|
|
|
let
|
2009-03-06 13:27:23 +01:00
|
|
|
inherit (pkgs.lib);
|
2008-05-08 15:47:44 +02:00
|
|
|
|
2009-03-06 13:27:23 +01:00
|
|
|
klogdCmd = "${pkgs.sysklogd}/sbin/klogd -c 1 -2 -k $(dirname $(readlink -f /var/run/booted-system/kernel))/System.map";
|
2008-05-08 15:47:44 +02:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
2009-03-06 13:27:23 +01:00
|
|
|
services = {
|
|
|
|
extraJobs = [{
|
|
|
|
name = "klogd";
|
|
|
|
|
|
|
|
job = ''
|
|
|
|
description "Kernel log daemon"
|
|
|
|
|
|
|
|
start on syslogd
|
|
|
|
stop on shutdown
|
2008-05-08 15:47:44 +02:00
|
|
|
|
2009-03-06 13:27:23 +01:00
|
|
|
start script
|
|
|
|
# !!! this hangs for some reason (it blocks reading from
|
|
|
|
# /proc/kmsg).
|
|
|
|
#${klogdCmd} -o
|
|
|
|
end script
|
|
|
|
|
|
|
|
respawn ${klogdCmd} -n
|
|
|
|
'';
|
|
|
|
}];
|
|
|
|
};
|
2008-05-08 15:47:44 +02:00
|
|
|
}
|