]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
gpt-auto: allow using without cryptsetup
authorDavid Seifert <soap@gentoo.org>
Wed, 12 Oct 2022 19:47:29 +0000 (21:47 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 12 Oct 2022 21:39:38 +0000 (06:39 +0900)
Fixes #24978

src/gpt-auto-generator/gpt-auto-generator.c

index 31377d877d5c38fd9f9c6b635496c53ddb883299..5584eb22af1a4a19724c1db4abf984d5fec146b2 100644 (file)
@@ -571,11 +571,15 @@ static int add_root_rw(DissectedPartition *p) {
 
 #if ENABLE_EFI
 static int add_root_cryptsetup(void) {
+#if HAVE_LIBCRYPTSETUP
 
         /* If a device /dev/gpt-auto-root-luks appears, then make it pull in systemd-cryptsetup-root.service, which
          * sets it up, and causes /dev/gpt-auto-root to appear which is all we are looking for. */
 
         return add_cryptsetup("root", "/dev/gpt-auto-root-luks", true, false, NULL);
+#else
+        return 0;
+#endif
 }
 #endif