From: Zbigniew Jędrzejewski-Szmek Date: Wed, 13 Nov 2013 03:01:10 +0000 (-0500) Subject: fstab-generator: use RequiresOverridable for fsck units X-Git-Tag: v209~1420 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=4e8da529592b01fee27f48962fe953b777de9b30;p=elogind.git fstab-generator: use RequiresOverridable for fsck units This allows the user to disable fsck's by masking. If fsck fails, emergency target is started, the user might mount the unit using mount and disable fsck by masking the unit. In this case, .mount will be active because the mount is detect through /proc/self/mountinfo, but systemd-fsck@.service will still be in failed mode. This results in a funny situation where $ systemctl show -p ActiveState local-fs.target yyy.mount ActiveState=active ActiveState=active $ sudo systemctl start local-fs.target [sudo] password for test: Failed to start local-fs.target: Unit systemd-fsck@xxx.service is masked. --- diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index fa0d3f735..1227f0895 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -183,7 +183,7 @@ static int add_fsck(FILE *f, const char *what, const char *where, const char *ty return log_oom(); fprintf(f, - "Requires=%s\n" + "RequiresOverridable=%s\n" "After=%s\n", fsck, fsck);