diff --git a/stages/org.osbuild.modprobe b/stages/org.osbuild.modprobe index c97266d7..50a78876 100755 --- a/stages/org.osbuild.modprobe +++ b/stages/org.osbuild.modprobe @@ -2,10 +2,8 @@ """ Configure modprobe -The option 'configuration_files' allows to create `.conf` configuration files -for modprobe in `/usr/lib/modprobe.d`. At least one configuration file must -be defined. Value os the options is a dictionary with keys being the names -of `.conf` files which will be created. Value of each key is a list +The 'config' option allows the creation of one ore more `.conf` configuration +files for modprobe in `/usr/lib/modprobe.d`. The value of each key is a list of "command" objects with at least the 'command' property and additional properties specific for each command type. The list must contain at least one "command" object. @@ -26,7 +24,7 @@ import osbuild.api SCHEMA = r""" "additionalProperties": false, "properties": { - "configuration_files": { + "config": { "additionalProperties": false, "type": "object", "description": "modprobe configuration files.", @@ -85,7 +83,7 @@ def create_configuration_files(tree, configuration_files_options): def main(tree, options): - configuration_files_options = options.get("configuration_files", {}) + configuration_files_options = options.get("config", {}) create_configuration_files(tree, configuration_files_options) diff --git a/test/data/stages/modprobe/b.json b/test/data/stages/modprobe/b.json index c818f581..95bd090a 100644 --- a/test/data/stages/modprobe/b.json +++ b/test/data/stages/modprobe/b.json @@ -457,7 +457,7 @@ { "name": "org.osbuild.modprobe", "options": { - "configuration_files": { + "config": { "disallow-modules.conf": [ { "command": "blacklist", diff --git a/test/data/stages/modprobe/b.mpp.json b/test/data/stages/modprobe/b.mpp.json index 720af301..4600a282 100644 --- a/test/data/stages/modprobe/b.mpp.json +++ b/test/data/stages/modprobe/b.mpp.json @@ -23,30 +23,32 @@ "baseurl": "https://rpmrepo.osbuild.org/v2/mirror/public/f34/f34-x86_64-fedora-20210512/" } ], - "packages": ["kmod"] + "packages": [ + "kmod" + ] } } }, { "name": "org.osbuild.modprobe", "options": { - "configuration_files": { - "disallow-modules.conf": [ - { - "command": "blacklist", - "modulename": "nouveau" - }, - { - "command": "blacklist", - "modulename": "floppy" - } - ], - "disallow-additional-modules.conf": [ - { - "command": "blacklist", - "modulename": "my-module" - } - ] + "config": { + "disallow-modules.conf": [ + { + "command": "blacklist", + "modulename": "nouveau" + }, + { + "command": "blacklist", + "modulename": "floppy" + } + ], + "disallow-additional-modules.conf": [ + { + "command": "blacklist", + "modulename": "my-module" + } + ] } } }