diff --git a/elements/modprobe-blacklist/README.md b/elements/modprobe-blacklist/README.md new file mode 100644 index 00000000..5f8c48db --- /dev/null +++ b/elements/modprobe-blacklist/README.md @@ -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" diff --git a/elements/modprobe-blacklist/install.d/80-modprobe-blacklist b/elements/modprobe-blacklist/install.d/80-modprobe-blacklist new file mode 100755 index 00000000..f787d016 --- /dev/null +++ b/elements/modprobe-blacklist/install.d/80-modprobe-blacklist @@ -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