]> git.proxmox.com Git - pve-container.git/commitdiff
fix suse version 13 check being inverted
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 6 Apr 2017 07:26:40 +0000 (09:26 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 6 Apr 2017 07:26:43 +0000 (09:26 +0200)
src/PVE/LXC/Setup/SUSE.pm

index 224dcd021bf07871db02a30d2ae8b8e147221ccf..54e6d561a49cf62448a64da054051be34efadb9f 100644 (file)
@@ -19,10 +19,11 @@ sub new {
 
     # Fixme: not sure whether the minor part is optional.
     if ($release =~ m/^\s*VERSION\s*=\s*(\d+)(?:\.(\d+))?\s*$/m) {
-       $version = "$1.$2";
-       if ($1 >= 42) {
+       my ($major, $minor) = ($1, $2//0);
+       $version = "$major.$minor";
+       if ($major >= 42) {
            # OK
-       } elsif ($1 == 13 || ($2//0) > 2) {
+       } elsif ($major == 13 && $minor <= 2) {
            # Note: 13.2 needs an updated AppArmor profile (in lxc
            # *after* 2.0.0.beta2)
            # OK