]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Skip first boot settings if systemd-firstboot is not installed
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 5 Feb 2024 08:47:16 +0000 (09:47 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 5 Feb 2024 08:47:16 +0000 (09:47 +0100)
mkosi/__init__.py

index ac7f2e8ab5b89c5804a8ebae8f46088de7023653..8069d6f4dcde0d6e2ced279cf52090ccfaa3bec2 100644 (file)
@@ -2461,6 +2461,10 @@ def run_firstboot(context: Context) -> None:
     if context.config.overlay or context.config.output_format.is_extension_image():
         return
 
+    if not find_binary("systemd-firstboot", root=context.config.tools()):
+        logging.info("systemd-firstboot is not installed, not applying first boot settings")
+        return
+
     password, hashed = context.config.root_password or (None, False)
     if password and not hashed:
         password = run(["openssl", "passwd", "-stdin", "-6"],