diff options
author | Thomas Bächler <thomas@archlinux.org> | 2013-09-30 01:34:44 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2013-10-19 12:23:17 +0200 |
commit | 64e70e4b86d3f732d3513189312f6220d1d5cfbc (patch) | |
tree | 102e0db2721b50056bdaa7d6bb34b4afb6a683dc /src/fstab-generator | |
parent | 7f5806d7095a197e4788a7803642831beec295bf (diff) |
fstab-generator: Generate explicit dependencies on systemd-fsck@.service instead of using FsckPassNo
[tomegun:
* order all fsck instances after fsck-root
* check for OOM
* added notes in the manpages]
Diffstat (limited to 'src/fstab-generator')
-rw-r--r-- | src/fstab-generator/fstab-generator.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index a7536f8f7e..77247dee5e 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -209,17 +209,30 @@ 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"); + if (!fsck) + return log_oom(); + + 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")) |