stages/modprobe: write only one config file

Instead of supporting writing an arbitrary number of configuration
files, just write one. This makes the stage and its schema clearer
and simpler. If more than one config file is needed, the stage can
be repeated multiple times. It is also more flexible since we can
in the future specify additional options at the top level which
will then be per-file, like a top level comment.
This commit is contained in:
Christian Kellner 2021-07-21 08:54:14 +00:00
parent 0190c991ae
commit 9f1d97a8b7
3 changed files with 87 additions and 89 deletions

View file

@ -457,24 +457,29 @@
{
"name": "org.osbuild.modprobe",
"options": {
"config": {
"disallow-modules.conf": [
{
"command": "blacklist",
"modulename": "nouveau"
},
{
"command": "blacklist",
"modulename": "floppy"
}
],
"disallow-additional-modules.conf": [
{
"command": "blacklist",
"modulename": "my-module"
}
]
}
"filename": "disallow-modules.conf",
"commands": [
{
"command": "blacklist",
"modulename": "nouveau"
},
{
"command": "blacklist",
"modulename": "floppy"
}
]
}
},
{
"name": "org.osbuild.modprobe",
"options": {
"filename": "disallow-additional-modules.conf",
"commands": [
{
"command": "blacklist",
"modulename": "my-module"
}
]
}
}
]

View file

@ -32,24 +32,29 @@
{
"name": "org.osbuild.modprobe",
"options": {
"config": {
"disallow-modules.conf": [
{
"command": "blacklist",
"modulename": "nouveau"
},
{
"command": "blacklist",
"modulename": "floppy"
}
],
"disallow-additional-modules.conf": [
{
"command": "blacklist",
"modulename": "my-module"
}
]
}
"filename": "disallow-modules.conf",
"commands": [
{
"command": "blacklist",
"modulename": "nouveau"
},
{
"command": "blacklist",
"modulename": "floppy"
}
]
}
},
{
"name": "org.osbuild.modprobe",
"options": {
"filename": "disallow-additional-modules.conf",
"commands": [
{
"command": "blacklist",
"modulename": "my-module"
}
]
}
}
]