Michal Schmidt 0afbbc
Fedora workaround for bz741655
Michal Schmidt 0afbbc
Michal Schmidt 0afbbc
After unlocking a crypto device, give LVM a chance to assemble a VG from it.
Michal Schmidt 0afbbc
Needed to make the crypto-on-lvm-on-crypto disk layout work.
Michal Schmidt 0afbbc
Michal Schmidt 0afbbc
Non-upstream patch. Will be obsoleted as soon as LVM gets the planned
Michal Schmidt 0afbbc
'policy daemon which will activate LV according to some system policy'.
Michal Schmidt 0afbbc
Michal Schmidt 0afbbc
Index: systemd-36/src/cryptsetup-generator.c
Michal Schmidt 0afbbc
===================================================================
Michal Schmidt 0afbbc
--- systemd-36.orig/src/cryptsetup-generator.c
Michal Schmidt 0afbbc
+++ systemd-36/src/cryptsetup-generator.c
Michal Schmidt 0afbbc
@@ -132,8 +132,10 @@ static int create_disk(
Michal Schmidt 0afbbc
                 "RemainAfterExit=yes\n"
Michal Schmidt 0afbbc
                 "TimeoutSec=0\n" /* the binary handles timeouts anyway */
Michal Schmidt 0afbbc
                 "ExecStart=" SYSTEMD_CRYPTSETUP_PATH " attach '%s' '%s' '%s' '%s'\n"
Michal Schmidt 0afbbc
+                "ExecStartPost=/lib/systemd/fedora-crypto-lvm-hack '/dev/mapper/%s'\n"
Michal Schmidt 0afbbc
                 "ExecStop=" SYSTEMD_CRYPTSETUP_PATH " detach '%s'\n",
Michal Schmidt 0afbbc
                 name, u, strempty(password), strempty(options),
Michal Schmidt 0afbbc
+                name,
Michal Schmidt 0afbbc
                 name);
Michal Schmidt 0afbbc
 
Michal Schmidt 0afbbc
         if (has_option(options, "tmp"))