From a5b0175d6db7553d0b41e4a4133da3f8b34189bf Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Thu, 21 Sep 2017 14:06:21 +0000 Subject: [PATCH] Do not do regex fo on variables that might not be defined yet --- modules/grub/manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/grub/manifests/init.pp b/modules/grub/manifests/init.pp index d23e3e8cd..bbb4ca4a3 100644 --- a/modules/grub/manifests/init.pp +++ b/modules/grub/manifests/init.pp @@ -27,7 +27,7 @@ class grub { if $grub_manage { # hp-health requires nopat on linux 4.9 - $grub_do_nopat = ($::systemproductname =~ /^ProLiant/ and versioncmp($::kernelversion, '4.9') >= 0) + $grub_do_nopat = ($::systemproductname and $::systemproductname =~ /^ProLiant/ and versioncmp($::kernelversion, '4.9') >= 0) $grub_do_extra = $::hostname in [fasolo] -- 2.20.1