From d88e9d09a6570fe729735740a966ed758ff81141 Mon Sep 17 00:00:00 2001 From: Michal Schmidt Date: Mon, 4 Apr 2011 09:57:08 +0200 Subject: separate "touch /.autorelabel" to a new unit Writing /.autorelabel from fedora-autorelabel does not work because the script is executed only if relabel was already requested. Create a new unit fedora-autorelabel-mark.service which will be responsible for creating /.autorelabel if SELinux is disabled. The unit takes advantage of the new "ConditionSecurity=" support in systemd. The old script checked for a read-only filesystem first. The new unit does not do that. If / is read-only, touch will simply fail. This should not be considered as a failure of the unit, so "-" is used in ExecStart. There have been arguments on systemd-devel that the root directory should not be abused for flag files like /.autorelabel. It has a long tradition in Fedora though (since 2005). Maybe we can change it eventually, but let's keep it where it is for now. --- Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a788e0ae..39dd84e2 100644 --- a/Makefile +++ b/Makefile @@ -126,6 +126,7 @@ install: ln -s ../fedora-loadmodules.service $(ROOT)/lib/systemd/system/basic.target.wants ln -s ../fedora-autoswap.service $(ROOT)/lib/systemd/system/basic.target.wants ln -s ../fedora-autorelabel.service $(ROOT)/lib/systemd/system/basic.target.wants + ln -s ../fedora-autorelabel-mark.service $(ROOT)/lib/systemd/system/basic.target.wants ln -s ../fedora-sysinit-hack.service $(ROOT)/lib/systemd/system/basic.target.wants ln -s ../fedora-readonly.service $(ROOT)/lib/systemd/system/local-fs.target.wants ln -s ../fedora-storage-init.service $(ROOT)/lib/systemd/system/local-fs.target.wants -- cgit v1.2.1