3
0
Fork 0
forked from mirrors/nixpkgs

Convert "syslogd"

svn path=/nixos/branches/fix-style/; revision=14367
This commit is contained in:
Marc Weber 2009-03-06 12:25:57 +00:00
parent 8a8d387b22
commit 29cca0f34c
3 changed files with 46 additions and 32 deletions

View file

@ -383,19 +383,6 @@ in
services = {
syslogd = {
tty = mkOption {
default = 10;
description = "
The tty device on which syslogd will print important log
messages.
";
};
};
ttyBackgrounds = {
enable = mkOption {
@ -1775,6 +1762,7 @@ in
(import ../upstart-jobs/pulseaudio.nix)
(import ../upstart-jobs/kbd.nix)
(import ../upstart-jobs/gw6c.nix) # Gateway6
(import ../upstart-jobs/syslogd.nix)
(import ../upstart-jobs/nix.nix) # nix options and daemon
(import ../system/nixos-installer.nix)

View file

@ -71,12 +71,6 @@ let
jobs = map makeJob
([
# Syslogd.
(import ../upstart-jobs/syslogd.nix {
inherit (pkgs) sysklogd writeText;
inherit config;
})
# Klogd.
(import ../upstart-jobs/klogd.nix {
inherit (pkgs) sysklogd writeText;

View file

@ -1,8 +1,32 @@
{sysklogd, writeText, config}:
{pkgs, config, ...}:
###### interface
let
inherit (pkgs.lib) mkOption mkIf;
options = {
services = {
syslogd = {
tty = mkOption {
default = 10;
description = "
The tty device on which syslogd will print important log
messages.
";
};
};
};
};
in
###### implementation
let
syslogConf = writeText "syslog.conf" ''
syslogConf = pkgs.writeText "syslog.conf" ''
kern.warning;*.err;authpriv.none /dev/tty10
# Send emergency messages to all users.
@ -22,6 +46,12 @@ let
in
{
require = [
options
];
services = {
extraJobs = [{
name = "syslogd";
job = ''
@ -32,6 +62,8 @@ in
env TZ=${config.time.timeZone}
respawn ${sysklogd}/sbin/syslogd -n -f ${syslogConf}
respawn ${pkgs.sysklogd}/sbin/syslogd -n -f ${syslogConf}
'';
}];
};
}