Support 'install' command in org.osbuild.modprobe stage

Add support for new 'install' command in the org.osbuild.modprobe stage.

Extend the unit test coverage to test the new command.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
This commit is contained in:
Tomas Hozza 2021-11-03 15:03:34 +01:00 committed by Tom Gundersen
parent 5df59a2251
commit daacf002fe
4 changed files with 59 additions and 2 deletions

View file

@ -481,6 +481,19 @@
}
]
}
},
{
"name": "org.osbuild.modprobe",
"options": {
"filename": "firewalld-sysctls.conf",
"commands": [
{
"command": "install",
"modulename": "nf_conntrack",
"cmdline": "/usr/sbin/modprobe --ignore-install nf_conntrack $CMDLINE_OPTS && /usr/sbin/sysctl --quiet --pattern 'net[.]netfilter[.]nf_conntrack.*' --system"
}
]
}
}
]
},

View file

@ -56,6 +56,19 @@
}
]
}
},
{
"name": "org.osbuild.modprobe",
"options": {
"filename": "firewalld-sysctls.conf",
"commands": [
{
"command": "install",
"modulename": "nf_conntrack",
"cmdline": "/usr/sbin/modprobe --ignore-install nf_conntrack $CMDLINE_OPTS && /usr/sbin/sysctl --quiet --pattern 'net[.]netfilter[.]nf_conntrack.*' --system"
}
]
}
}
]
}

View file

@ -1,7 +1,8 @@
{
"added_files": [
"/usr/lib/modprobe.d/disallow-modules.conf",
"/usr/lib/modprobe.d/disallow-additional-modules.conf"
"/usr/lib/modprobe.d/disallow-additional-modules.conf",
"/usr/lib/modprobe.d/firewalld-sysctls.conf"
],
"deleted_files": [],
"differences": {}