about summary refs log tree commit diff
path: root/modules/services/logging
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2009-10-12 16:36:19 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2009-10-12 16:36:19 +0000
commite91d882a946fc736f62235296e77c139cee7d9b3 (patch)
treee220488319f0cc28aafb01ca26809429eeaf7f82 /modules/services/logging
parent4a78ef25e73da292d060a2afde0c00980a22b2ac (diff)
downloadnixlib-e91d882a946fc736f62235296e77c139cee7d9b3.tar
nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.tar.gz
nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.tar.bz2
nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.tar.lz
nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.tar.xz
nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.tar.zst
nixlib-e91d882a946fc736f62235296e77c139cee7d9b3.zip
* Converted modules that were still using the old (concrete syntax)
  style of declaring Upstart jobs.  While at it, converted them to the
  current NixOS module style and improved some option descriptions.
  Hopefully I didn't break too much :-)

svn path=/nixos/trunk/; revision=17761
Diffstat (limited to 'modules/services/logging')
-rw-r--r--modules/services/logging/klogd.nix32
1 files changed, 14 insertions, 18 deletions
diff --git a/modules/services/logging/klogd.nix b/modules/services/logging/klogd.nix
index 59ab51fea928..f8c26e0f1666 100644
--- a/modules/services/logging/klogd.nix
+++ b/modules/services/logging/klogd.nix
@@ -1,8 +1,8 @@
-{pkgs, config, ...}:
+{ config, pkgs, ... }:
 
 ###### implementation
+
 let
-  inherit (pkgs.lib);
 
   klogdCmd = "${pkgs.sysklogd}/sbin/klogd -c 1 -2 -k $(dirname $(readlink -f /var/run/booted-system/kernel))/System.map";
 
@@ -10,24 +10,20 @@ in
 
 {
 
-  services = {
-    extraJobs = [{
-      name = "klogd";
-      
-      job = ''
-        description "Kernel log daemon"
-      
-        start on syslogd
-        stop on shutdown
-
-        start script
+  jobAttrs.klogd =
+    { description = "Kernel log daemon";
+
+      startOn = "syslogd";
+      stopOn = "shutdown";
+
+      preStart =
+        ''
           # !!! this hangs for some reason (it blocks reading from
           # /proc/kmsg).
           #${klogdCmd} -o
-        end script
+        '';
 
-        respawn ${klogdCmd} -n
-      '';
-    }];
-  };
+      exec = "${klogdCmd} -n";
+    };
+    
 }