aboutsummaryrefslogtreecommitdiffstats
path: root/systemd/system/rhel-autorelabel.service
diff options
context:
space:
mode:
Diffstat (limited to 'systemd/system/rhel-autorelabel.service')
-rw-r--r--systemd/system/rhel-autorelabel.service17
1 files changed, 17 insertions, 0 deletions
diff --git a/systemd/system/rhel-autorelabel.service b/systemd/system/rhel-autorelabel.service
new file mode 100644
index 00000000..d277cf86
--- /dev/null
+++ b/systemd/system/rhel-autorelabel.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=Relabel all filesystems, if necessary
+DefaultDependencies=no
+Requires=local-fs.target
+Conflicts=shutdown.target
+After=local-fs.target
+Before=sysinit.target shutdown.target
+ConditionSecurity=selinux
+ConditionKernelCommandLine=|autorelabel
+ConditionPathExists=|/.autorelabel
+
+[Service]
+ExecStart=/lib/systemd/rhel-autorelabel
+Type=oneshot
+TimeoutSec=0
+RemainAfterExit=yes
+StandardInput=tty