|
Zbigniew Jędrzejewski-Szmek |
930e1b |
From a787829ac3db6a0f34c59180c796dfa49f46d34c Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
Date: Tue, 12 Nov 2013 22:01:10 -0500
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
Subject: [PATCH] fstab-generator: use RequiresOverridable for fsck units
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
This allows the user to disable fsck's by masking.
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
If fsck fails, emergency target is started, the user might mount the
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
unit using mount and disable fsck by masking the unit. In this case,
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
.mount will be active because the mount is detect through
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
/proc/self/mountinfo, but systemd-fsck@.service will still be in
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
failed mode. This results in a funny situation where
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
$ systemctl show -p ActiveState local-fs.target yyy.mount
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
ActiveState=active
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
ActiveState=active
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
$ sudo systemctl start local-fs.target
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
[sudo] password for test:
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
Failed to start local-fs.target: Unit systemd-fsck@xxx.service is masked.
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
---
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
src/fstab-generator/fstab-generator.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
index 795a24c..4137796 100644
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
--- a/src/fstab-generator/fstab-generator.c
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
+++ b/src/fstab-generator/fstab-generator.c
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
@@ -184,7 +184,7 @@ static int add_fsck(FILE *f, const char *what, const char *where, const char *ty
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
return log_oom();
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
fprintf(f,
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
- "Requires=%s\n"
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
+ "RequiresOverridable=%s\n"
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
"After=%s\n",
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
fsck,
|
|
Zbigniew Jędrzejewski-Szmek |
930e1b |
fsck);
|