Add new modprobe-blacklist element.
This element can be used to provide a custom list of modules via DIB_MODPROBE_BLACKLIST which will be disabled via modprobe.d/blacklist.conf. I'm using this to disable network adapters on the Red Hat TripleO rack where the devices can't be explicitly disabled via the BIOS. Change-Id: I8a0a8ee05fa62628434d7f6422577dbf5cdd7a2e
This commit is contained in:
parent
77370c6740
commit
ab9d5d3cc3
9
elements/modprobe-blacklist/README.md
Normal file
9
elements/modprobe-blacklist/README.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Blacklist specific modules using modprobe.d/blacklist.conf.
|
||||||
|
|
||||||
|
In order to use set DIB_MODPROBE_BLACKLIST to the name of your
|
||||||
|
module. To disable multiple modules you can set DIB_MODPROBE_BLACKLIST
|
||||||
|
to a list of string separated by spaces.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
export DIB_MODPROBE_BLACKLIST="igb"
|
8
elements/modprobe-blacklist/install.d/80-modprobe-blacklist
Executable file
8
elements/modprobe-blacklist/install.d/80-modprobe-blacklist
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
MODULES_LIST=${DIB_MODPROBE_BLACKLIST:?"Please set DIB_MODPROBE_BLACKLIST."}
|
||||||
|
|
||||||
|
for mod_name in $MODULES_LIST; do
|
||||||
|
echo "blacklist $mod_name" >> /etc/modprobe.d/blacklist.conf
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user