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.
This commit is contained in:
Vitaly Kuznetsov
2026-01-12 17:05:59 +01:00
parent 30f3a7ad51
commit 15b1c334df

View File

@@ -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);