From 8b30a8f23f282cdf0ba0f71f628de2774925d495 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 8 Aug 2011 14:40:16 +0000 Subject: [PATCH] * In the VM tests, add "-m 0" to syslogd to kill the "-- MARK --" messages. These prevent hanging tests from being killed after 1 hour of silence. svn path=/nixos/trunk/; revision=28393 --- modules/services/logging/syslogd.nix | 15 ++++++++++++--- modules/testing/test-instrumentation.nix | 4 ++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/modules/services/logging/syslogd.nix b/modules/services/logging/syslogd.nix index 083568b51e3..bb088c250f6 100644 --- a/modules/services/logging/syslogd.nix +++ b/modules/services/logging/syslogd.nix @@ -27,8 +27,6 @@ let *.*;mail.none;local1.none -/var/log/messages ''; - syslogdParameters = if cfg.enableNetworkInput then "-r " else ""; - in { @@ -75,6 +73,15 @@ in ''; }; + extraParams = mkOption { + type = types.listOf types.string; + default = [ ]; + example = [ "-m 0" ]; + description = '' + Additional parameters passed to syslogd. + ''; + }; + }; }; @@ -84,6 +91,8 @@ in config = { + services.syslogd.extraParams = optional cfg.enableNetworkInput "-r"; + jobs.syslogd = { description = "Syslog daemon"; @@ -93,7 +102,7 @@ in daemonType = "fork"; - exec = "${pkgs.sysklogd}/sbin/syslogd ${syslogdParameters} -f ${syslogConf}"; + exec = "${pkgs.sysklogd}/sbin/syslogd ${toString cfg.extraParams} -f ${syslogConf}"; }; }; diff --git a/modules/testing/test-instrumentation.nix b/modules/testing/test-instrumentation.nix index d1b3fe154d5..e2434aeb9ec 100644 --- a/modules/testing/test-instrumentation.nix +++ b/modules/testing/test-instrumentation.nix @@ -92,6 +92,10 @@ in # Send all of /var/log/messages to the serial port. services.syslogd.extraConfig = "*.* /dev/ttyS0"; + # Disable "-- MARK --" messages. These prevent hanging tests from + # being killed after 1 hour of silence. + services.syslogd.extraParams = [ "-m 0" ]; + # Don't run klogd. Kernel messages appear on the serial console anyway. jobs.klogd.startOn = mkOverride 50 "";