From 4e732874567c6c6196320580a0129bbbee15a9fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 21 Jul 2011 07:42:05 +0000 Subject: [PATCH] Adding a syslog parameter to receive log from other devices through the network. svn path=/nixos/trunk/; revision=27866 --- modules/services/logging/syslogd.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules/services/logging/syslogd.nix b/modules/services/logging/syslogd.nix index b600d353fe5..083568b51e3 100644 --- a/modules/services/logging/syslogd.nix +++ b/modules/services/logging/syslogd.nix @@ -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}"; }; };