]> git.proxmox.com Git - pve-container.git/blobdiff - src/PVE/LXC/Setup/Base.pm
fix #4088: ignore systemd minor version for detection
[pve-container.git] / src / PVE / LXC / Setup / Base.pm
index 7c93dfba60628972b1e3035c0c3e41518bdf77fc..8580bf039eafa08f5ef6fd57d99e7dfd465ed63d 100644 (file)
@@ -514,7 +514,7 @@ sub clear_machine_id {
     }
 }
 
-# tries to guess the systemd version based on the existence of
+# tries to guess the systemd (major) version based on the existence of
 # (/usr)?/lib/systemd/libsystemd-shared<version>.so. It was introduced in v231.
 sub get_systemd_version {
     my ($self) = @_;
@@ -522,7 +522,7 @@ sub get_systemd_version {
     my $sd_lib_dir = $self->ct_is_directory("/lib/systemd") ?
        "/lib/systemd" : "/usr/lib/systemd";
     my $libsd = PVE::Tools::dir_glob_regex($sd_lib_dir, "libsystemd-shared-.+\.so");
-    if (defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)\.so/) {
+    if (defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)(?:\..*)?\.so/) {
        return $1;
     }