Add restorecon service

This service runs `restorecon` on `/var` to fix any errant SELinux
labels when the system first boots following an update.
master
Dustin 2023-03-09 09:35:17 -06:00
parent 20b85fe8e2
commit c97c7f565b
2 changed files with 17 additions and 0 deletions

View File

@ -1,5 +1,7 @@
enable auditd.service enable auditd.service
enable restorecon.service
disable ldconfig.service disable ldconfig.service
disable systemd-userdbd.service disable systemd-userdbd.service

View File

@ -0,0 +1,15 @@
[Unit]
Description=Restore SELinux file contexts in /var
ConditionNeedsUpdate=/var
DefaultDependencies=no
After=local-fs.target
Before=sysinit.target
Before=systemd-tmpfiles-setup.service
Before=systemd-update-done.service
[Service]
Type=oneshot
ExecStart=/usr/sbin/restorecon -RFv /var
[Install]
WantedBy=sysinit.target