diff --git a/build_files/systemd-dx.sh b/build_files/systemd-dx.sh index 7e234733da8..53595bb0c44 100755 --- a/build_files/systemd-dx.sh +++ b/build_files/systemd-dx.sh @@ -5,6 +5,7 @@ set -ouex pipefail systemctl enable docker.socket systemctl enable podman.socket systemctl enable swtpm-workaround.service +systemctl enable libvirt-workaround.service systemctl enable bluefin-dx-groups.service systemctl enable --global bluefin-dx-user-vscode.service systemctl disable pmie.service diff --git a/system_files/dx/usr/lib/systemd/system/libvirt-workaround.service b/system_files/dx/usr/lib/systemd/system/libvirt-workaround.service new file mode 100644 index 00000000000..91498c76909 --- /dev/null +++ b/system_files/dx/usr/lib/systemd/system/libvirt-workaround.service @@ -0,0 +1,13 @@ +[Unit] +Description=Workaround to relabel libvirt files and directories +ConditionPathIsDirectory=/var/lib/libvirt/ +After=local-fs.target + +[Service] +Type=oneshot +ExecStart=-/usr/sbin/restorecon -R /var/log/libvirt/ +ExecStart=-/usr/sbin/restorecon -R /var/lib/libvirt/ +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target diff --git a/system_files/dx/usr/lib/tmpfiles.d/libvirt-workaround.conf b/system_files/dx/usr/lib/tmpfiles.d/libvirt-workaround.conf new file mode 100644 index 00000000000..4af298b7b5a --- /dev/null +++ b/system_files/dx/usr/lib/tmpfiles.d/libvirt-workaround.conf @@ -0,0 +1 @@ +d /var/log/libvirt 0750 - - - -