From 78c74eed3c7d943e4f496f462634c0c63bbcd291 Mon Sep 17 00:00:00 2001 From: schlitzered Date: Fri, 26 Feb 2021 10:58:32 +0100 Subject: [PATCH] Update init.pp Some sysctl values return "tabs", this breakes the test for changes, since there is no sane way to specify tabs in the target value. this change converts tabs in the output of sysctl -n to two spaces. resolving this issue of false positive change detection --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 70e2ee5..5f606e7 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -90,7 +90,7 @@ $qvalue = shellquote("${value}") # lint:endignore exec { "enforce-sysctl-value-${qtitle}": - unless => "/usr/bin/test \"$(/sbin/sysctl -n ${qtitle})\" = ${qvalue}", + unless => "/usr/bin/test \"$(/sbin/sysctl -n ${qtitle} | sed -e 's/\t/ /g')\" = ${qvalue}", command => "/sbin/sysctl -w ${qtitle}=${qvalue}", } }