summaryrefslogtreecommitdiffstats
path: root/test/units/firstboot-autorelabel.service
diff options
context:
space:
mode:
Diffstat (limited to 'test/units/firstboot-autorelabel.service')
-rw-r--r--test/units/firstboot-autorelabel.service20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/units/firstboot-autorelabel.service b/test/units/firstboot-autorelabel.service
new file mode 100644
index 0000000000..b69dcf72a3
--- /dev/null
+++ b/test/units/firstboot-autorelabel.service
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+[Unit]
+Description=Activate relabelling on firstboot only
+DefaultDependencies=no
+Wants=first-boot-complete.target
+Requires=local-fs.target
+After=local-fs.target
+Conflicts=shutdown.target
+Before=shutdown.target
+Before=first-boot-complete.target sysinit.target autorelabel.service
+ConditionPathIsReadWrite=/etc
+ConditionFirstBoot=yes
+
+[Service]
+ExecStart=touch /.autorelabel
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=sysinit.target