summaryrefslogtreecommitdiffstats
path: root/test/units/autorelabel.service
blob: 7e5f9a2b89bdc9ad8805ad9038d3960c72689edb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# SPDX-License-Identifier: LGPL-2.1-or-later
[Unit]
Description=Relabel all filesystems
DefaultDependencies=no
Requires=local-fs.target
Conflicts=shutdown.target
After=local-fs.target
Before=sysinit.target shutdown.target
ConditionSecurity=selinux
ConditionPathExists=|/.autorelabel

[Service]
ExecStart=sh -xec 'echo 0 >/sys/fs/selinux/enforce; fixfiles -f -F relabel; rm /.autorelabel; systemctl --force reboot'
Type=oneshot
TimeoutSec=infinity
RemainAfterExit=yes

[Install]
WantedBy=basic.target