Skip to content

Commit

Permalink
fix(dx): adds a systemd unit workaround service to relabel libvirt fi…
Browse files Browse the repository at this point in the history
…les (#1586)
  • Loading branch information
p5 authored Aug 14, 2024
1 parent 1e47fda commit e023b60
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions build_files/systemd-dx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions system_files/dx/usr/lib/systemd/system/libvirt-workaround.service
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions system_files/dx/usr/lib/tmpfiles.d/libvirt-workaround.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d /var/log/libvirt 0750 - - - -

0 comments on commit e023b60

Please sign in to comment.