Do not do regex fo on variables that might not be defined yet
[mirror/dsa-puppet.git] / modules / grub / manifests / init.pp
index d23e3e8..bbb4ca4 100644 (file)
@@ -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]