From: Peter Palfrader Date: Thu, 21 Sep 2017 14:06:21 +0000 (+0000) Subject: Do not do regex fo on variables that might not be defined yet X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=a5b0175d6db7553d0b41e4a4133da3f8b34189bf;p=mirror%2Fdsa-puppet.git Do not do regex fo on variables that might not be defined yet --- 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]