From 468da466b4809171469341a199f6d8cb7f6f7673 Mon Sep 17 00:00:00 2001 From: Hans Persson <hans@nsc.liu.se> Date: Wed, 24 Feb 2021 10:33:11 +0100 Subject: [PATCH] Explicitly test for empty string. In puppet version 4 and later, the empty string is considered true. This means that conditions written as only 'if $var {' may suddenly end up taking the opposite code path than originally expected. Add an explicit test for the empty string to avoid this. --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index b28d1fd..09ca6b3 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -83,7 +83,7 @@ define tsmclient($serveraddress=undef, $nodename=$fqdn, $tsmclient::config::default_inclexcl, $inclexcl) - if $serveraddress { + if $serveraddress and $serveraddress != '' { $tsm_serveraddress = $serveraddress } elsif ($tsmclient::config::tsmservers and $name in $tsmclient::config::tsmservers) { -- GitLab