]> git.proxmox.com Git - pve-manager.git/commitdiff
pve7to8: Fix Fedora 38 systemd unified cgroupv2 check
authorChristian Ebner <c.ebner@proxmox.com>
Mon, 28 Aug 2023 07:54:14 +0000 (09:54 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 27 Sep 2023 14:51:35 +0000 (16:51 +0200)
For Fedora 38 the systemd shared object files used to check the systemd
version are located at /usr/lib64/systemd or /usr/lib/systemd.
Therefore, include /usr/lib64/systemd in the list of directories to
check.

Further, Fedora 38 adds a fc38 postfix to the filename, so expand the
regex to cover that as well.

Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
PVE/CLI/pve7to8.pm

index ff8e6045f5f28c9ae2620f2ee48c60d8b8b5c6b3..3947b260e61463011c0dc1f33c6b7a96882425e0 100644 (file)
@@ -1022,12 +1022,18 @@ sub check_containers_cgroup_compat {
        my $get_systemd_version = sub {
            my ($self) = @_;
 
+           my @dirs = (
+               '/lib/systemd',
+               '/usr/lib/systemd',
+               '/usr/lib/x86_64-linux-gnu/systemd',
+               '/usr/lib64/systemd'
+           );
            my $libsd;
-           for my $dir ('/lib/systemd', '/usr/lib/systemd', '/usr/lib/x86_64-linux-gnu/systemd') {
+           for my $dir (@dirs) {
                $libsd = PVE::Tools::dir_glob_regex($dir, "libsystemd-shared-.+\.so");
                last if defined($libsd);
            }
-           if (defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)(\.\d-\d)?\.so/) {
+           if (defined($libsd) && $libsd =~ /libsystemd-shared-(\d+)(\.\d-\d)?(\.fc\d\d)?\.so/) {
                return $1;
            }