* Purify syslog.conf (it doesn't have to be in /etc).

svn path=/nixos/trunk/; revision=11436
This commit is contained in:
Eelco Dolstra 2008-04-01 12:50:47 +00:00
parent a0fc21eda3
commit 3979844e22
4 changed files with 17 additions and 11 deletions

View File

@ -62,11 +62,6 @@ import ../helpers/make-etc.nix {
target = "nsswitch.conf"; target = "nsswitch.conf";
} }
{ # Configuration file for the system logging daemon.
source = ./syslog.conf;
target = "syslog.conf";
}
{ # Friendly greeting on the virtual consoles. { # Friendly greeting on the virtual consoles.
source = pkgs.writeText "issue" '' source = pkgs.writeText "issue" ''

View File

@ -1,3 +0,0 @@
*.* /dev/tty10
*.* -/var/log/messages

View File

@ -75,7 +75,7 @@ let
[ [
# Syslogd. # Syslogd.
(import ../upstart-jobs/syslogd.nix { (import ../upstart-jobs/syslogd.nix {
inherit (pkgs) sysklogd; inherit (pkgs) sysklogd writeText;
}) })
# The udev daemon creates devices nodes and runs programs when # The udev daemon creates devices nodes and runs programs when

View File

@ -1,10 +1,24 @@
{sysklogd}: {sysklogd, writeText}:
let
syslogConf = writeText "syslog.conf" ''
*.* /dev/tty10
*.=warning;*.=err -/var/log/warn
*.crit /var/log/warn
*.* -/var/log/messages
'';
in
{ {
name = "syslogd"; name = "syslogd";
job = " job = "
start on udev start on udev
stop on shutdown stop on shutdown
respawn ${sysklogd}/sbin/syslogd -n respawn ${sysklogd}/sbin/syslogd -n -f ${syslogConf}
"; ";
} }