[systemd-devel] [PATCH 1/3] fstab-generator: Generate explicit dependencies on systemd-fsck at .service instead of using FsckPassNo
Thomas Bächler
thomas at archlinux.org
Sun Sep 29 16:34:44 PDT 2013
---
src/fstab-generator/fstab-generator.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 6cecb4e..83aba7d 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -209,17 +209,26 @@ static int add_mount(
"Before=%s\n",
post);
+ if (passno > 0) {
+ _cleanup_free_ char *fsck = NULL;
+ fsck = unit_name_from_path_instance("systemd-fsck", what, ".service");
+ fprintf(f,
+ "Requires=%s\n"
+ "After=%s\n",
+ fsck,
+ fsck);
+ }
+
+
fprintf(f,
"\n"
"[Mount]\n"
"What=%s\n"
"Where=%s\n"
- "Type=%s\n"
- "FsckPassNo=%i\n",
+ "Type=%s\n",
what,
where,
- type,
- passno);
+ type);
if (!isempty(opts) &&
!streq(opts, "defaults"))
--
1.8.4
More information about the systemd-devel
mailing list