From 3bd543774084d9f1e56a3ee2e0adbe1fb4ff98b3 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 23 Mar 2011 01:10:37 -0300 Subject: Kernel printk config enhancement --- manifests/subsystems/sysctl.pp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/manifests/subsystems/sysctl.pp b/manifests/subsystems/sysctl.pp index 3e2e198..f6b7585 100644 --- a/manifests/subsystems/sysctl.pp +++ b/manifests/subsystems/sysctl.pp @@ -14,12 +14,19 @@ class sysctl { refreshonly => true, } + $printk_levels = '3 4 1 3' + file { "/etc/sysctl.d/kernel.printk.conf": owner => "root", group => "root", mode => 0644, ensure => present, - content => "kernel.printk = 3 4 1 3\n", + content => "kernel.printk = $printk_levels\n", + } + + exec { "/bin/echo '$printk_levels' > /proc/sys/kernel/printk": + subscribe => File["/etc/sysctl.d/kern.printk.conf"], + refreshonly => true, } } -- cgit v1.2.3