diskimage-builder/diskimage_builder/elements/modprobe/extra-data.d/50-modprobe-blacklist
Yolanda Robla 31383970c7 Add new modprobe element
This element will replace modprobe-blacklist element. It wil
still have the blacklist functionality, but it also adds
the feature of passing a complete file with settings to the
modprobe.d directory. Adding this functionality, that will
allow elements that depends on this module, to just copy the
specified files to the final directory.

Change-Id: I9a44f7d11520b8b1e604956d3c1db2fc7e2bf457
2018-06-28 13:55:53 +02:00

21 lines
438 B
Bash
Executable File

#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# copy all modprobe.d snippets to /etc/modprobe.d
eval declare -A image_elements=($(get_image_element_array))
for i in "${!image_elements[@]}"; do
element=$i
element_dir=${image_elements[$i]}
if [ -d "${element_dir}/modprobe.d/" ]; then
sudo cp ${element_dir}/modprobe.d/*.conf $TMP_MOUNT_PATH/etc/modprobe.d/
fi
done