Convert "klogd"

svn path=/nixos/branches/fix-style/; revision=14398
This commit is contained in:
Marc Weber 2009-03-06 12:27:23 +00:00
parent dd0f98fe22
commit bfc722e83d
3 changed files with 26 additions and 22 deletions

View File

@ -414,6 +414,9 @@ in
(import ../system/unix-odbc-drivers.nix)
(import ../upstart-jobs/klogd.nix)
# security
(import ../system/sudo.nix)

View File

@ -71,12 +71,6 @@ let
jobs = map makeJob
([
# Klogd.
(import ../upstart-jobs/klogd.nix {
inherit (pkgs) sysklogd writeText;
inherit config;
})
# Makes LVM logical volumes available.
(import ../upstart-jobs/lvm.nix {
inherit modprobe;

View File

@ -1,26 +1,33 @@
{sysklogd, writeText, config}:
{pkgs, config, ...}:
###### implementation
let
inherit (pkgs.lib);
klogdCmd = "${sysklogd}/sbin/klogd -c 1 -2 -k $(dirname $(readlink -f /var/run/booted-system/kernel))/System.map";
klogdCmd = "${pkgs.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
services = {
extraJobs = [{
name = "klogd";
job = ''
description "Kernel log daemon"
start on syslogd
stop on shutdown
respawn ${klogdCmd} -n
'';
start script
# !!! this hangs for some reason (it blocks reading from
# /proc/kmsg).
#${klogdCmd} -o
end script
respawn ${klogdCmd} -n
'';
}];
};
}