diff --git a/stages/org.osbuild.ostree.config b/stages/org.osbuild.ostree.config index e9241b8a..2b799aa0 100755 --- a/stages/org.osbuild.ostree.config +++ b/stages/org.osbuild.ostree.config @@ -63,13 +63,16 @@ def ostree(*args, _input=None, **kwargs): def main(tree, options): repo = os.path.join(tree, options["repo"].lstrip("/")) - config = options["config"] + sysroot_options = options["config"].get("sysroot", {}) - for group, items in config.items(): - for key, value in items.items(): - name = f"{group}.{key}" - ostree("config", "set", name, str(value), - repo=repo) + bootloader = sysroot_options.get("bootloader") + if bootloader: + ostree("config", "set", "sysroot.bootloader", bootloader, repo=repo) + + readonly = sysroot_options.get("readonly") + if readonly is not None: # can be False, which we would want to set + ro = "true" if readonly else "false" + ostree("config", "set", "sysroot.readonly", ro, repo=repo) if __name__ == '__main__':