]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Fix non-bootable Arch images 298/head
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 29 Nov 2018 23:29:59 +0000 (15:29 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Thu, 29 Nov 2018 23:31:27 +0000 (15:31 -0800)
mkosi

diff --git a/mkosi b/mkosi
index dca365eb2831c08953da07fe084aa8f343d18a6d..fdb4bb7281382883817dd45ccb06f83aa03825c6 100755 (executable)
--- a/mkosi
+++ b/mkosi
@@ -1626,12 +1626,13 @@ SigLevel    = Required DatabaseOptional
     # Set up system with packages from the base group
     run_pacstrap(packages)
 
-    # Patch mkinitcpio configuration so: 1) we remove autodetect and
-    # 2) we add the modules needed for encrypt.
-    patch_file(os.path.join(workspace, "root", "etc/mkinitcpio.conf"),
-               lambda line: "HOOKS=\"systemd modconf block sd-encrypt filesystems keyboard fsck\"\n" if line.startswith("HOOKS=") and args.encrypt == "all" else
-                            "HOOKS=\"systemd modconf block filesystems fsck\"\n"                     if line.startswith("HOOKS=") else
-                            line)
+    if args.bootable:
+        # Patch mkinitcpio configuration so: 1) we remove autodetect and
+        # 2) we add the modules needed for encrypt.
+        patch_file(os.path.join(workspace, "root", "etc/mkinitcpio.conf"),
+                   lambda line: "HOOKS=\"systemd modconf block sd-encrypt filesystems keyboard fsck\"\n" if line.startswith("HOOKS=") and args.encrypt == "all" else
+                                "HOOKS=\"systemd modconf block filesystems fsck\"\n"                     if line.startswith("HOOKS=") else
+                                line)
 
     # Install the user-specified packages and kernel
     packages = set(args.packages)