Adding a syslog parameter to receive log from other devices through the network.

svn path=/nixos/trunk/; revision=27866
This commit is contained in:
Lluís Batlle i Rossell 2011-07-21 07:42:05 +00:00
parent 68350e646d
commit 4e73287456

View file

@ -26,6 +26,9 @@ let
*.*;mail.none;local1.none -/var/log/messages
'';
syslogdParameters = if cfg.enableNetworkInput then "-r " else "";
in
{
@ -54,6 +57,14 @@ in
'';
};
enableNetworkInput = mkOption {
type = types.bool;
default = false;
description = ''
Accept logging through UDP. Option -r of syslogd(8).
'';
};
extraConfig = mkOption {
type = types.string;
default = "";
@ -82,7 +93,7 @@ in
daemonType = "fork";
exec = "${pkgs.sysklogd}/sbin/syslogd -f ${syslogConf}";
exec = "${pkgs.sysklogd}/sbin/syslogd ${syslogdParameters} -f ${syslogConf}";
};
};