2009-10-12 16:36:19 +00:00
|
|
|
{ config, pkgs, ... }:
|
2008-05-08 13:47:44 +00:00
|
|
|
|
2009-03-06 12:27:23 +00:00
|
|
|
###### implementation
|
2009-10-12 16:36:19 +00:00
|
|
|
|
2008-05-08 13:47:44 +00:00
|
|
|
let
|
|
|
|
|
2009-03-06 12:27:23 +00:00
|
|
|
klogdCmd = "${pkgs.sysklogd}/sbin/klogd -c 1 -2 -k $(dirname $(readlink -f /var/run/booted-system/kernel))/System.map";
|
2008-05-08 13:47:44 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
|
|
|
|
{
|
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
jobAttrs.klogd =
|
|
|
|
{ description = "Kernel log daemon";
|
|
|
|
|
|
|
|
startOn = "syslogd";
|
|
|
|
stopOn = "shutdown";
|
|
|
|
|
|
|
|
preStart =
|
|
|
|
''
|
2009-03-06 12:27:23 +00:00
|
|
|
# !!! this hangs for some reason (it blocks reading from
|
|
|
|
# /proc/kmsg).
|
|
|
|
#${klogdCmd} -o
|
2009-10-12 16:36:19 +00:00
|
|
|
'';
|
2009-03-06 12:27:23 +00:00
|
|
|
|
2009-10-12 16:36:19 +00:00
|
|
|
exec = "${klogdCmd} -n";
|
|
|
|
};
|
|
|
|
|
2008-05-08 13:47:44 +00:00
|
|
|
}
|