From: Vitaly Kuznetsov Date: Mon, 12 Jan 2026 16:05:59 +0000 (+0100) Subject: repart: Generate fstab and crypttab late X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15b1c334dff04708e2ba6ba712a1474f0128563c;p=thirdparty%2Fsystemd.git repart: Generate fstab and crypttab late The immediate need for the change is to allow to capture the expected LUKS volume key hash and record it to the generated crypttab but it also seems to make sense to not generate crypttab/fstab before we know that partition creation succeeded as fstab/crypttab entries are bogus otherwise. --- diff --git a/src/repart/repart.c b/src/repart/repart.c index 19bd3441caa..7c19f102877 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -10719,14 +10719,6 @@ static int run(int argc, char *argv[]) { if (r < 0) return r; - r = context_fstab(context); - if (r < 0) - return r; - - r = context_crypttab(context); - if (r < 0) - return r; - r = context_update_verity_size(context); if (r < 0) return r; @@ -10782,6 +10774,14 @@ static int run(int argc, char *argv[]) { if (r < 0) return r; + r = context_fstab(context); + if (r < 0) + return r; + + r = context_crypttab(context); + if (r < 0) + return r; + (void) context_dump(context, /* late= */ true); context_disarm_auto_removal(context);