summaryrefslogtreecommitdiff
path: root/src/shared/generator.c
diff options
context:
space:
mode:
authorMichael Marineau <michael.marineau@coreos.com>2015-11-12 18:10:57 -0800
committerMichael Marineau <michael.marineau@coreos.com>2015-11-12 18:35:27 -0800
commit5fd534d919c0dc94db05cf6661d3f4819f2d7b22 (patch)
tree8af81257d54e62c4ce6eefc7e31e43f171cb1777 /src/shared/generator.c
parent87fde73e185fabc346ee4d9c9befe972e3502dc3 (diff)
generator: order initrd fsck-root after local-fs-pre
The initrd version of systemd-fsck-root.service must wait for local-fs-pre.target just like systemd-fsck@.service to prevent modifications to the filesystem prior to resuming from hibernation. As-is my laptop routinely fails to resume due to fsck errors. The rest of the time it is probably silently corrupting the filesystem. Unlike normal boot, in the initrd systemd-fsck-root.service has no special significance so it needs to be kept in sync with systemd-fsck@.service. The name systemd-fsck-root.service is only used to preserve state across switch-root.
Diffstat (limited to 'src/shared/generator.c')
-rw-r--r--src/shared/generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/generator.c b/src/shared/generator.c
index cb4ebc606e..b3c22ff51d 100644
--- a/src/shared/generator.c
+++ b/src/shared/generator.c
@@ -64,7 +64,7 @@ static int write_fsck_sysroot_service(const char *dir, const char *what) {
"Description=File System Check on %2$s\n"
"DefaultDependencies=no\n"
"BindsTo=%3$s\n"
- "After=%3$s\n"
+ "After=%3$s local-fs-pre.target\n"
"Before=shutdown.target\n"
"\n"
"[Service]\n"