add exclude_drivers

This commit is contained in:
illiliti 2020-03-01 17:39:12 +03:00
parent d6e1d23c70
commit a464d0731d
2 changed files with 11 additions and 2 deletions

3
config
View File

@ -44,6 +44,9 @@
# custom drivers
#drivers=""
# exclude drivers
#drivers_exclude=""
# custom binaries
#binaries=""

View File

@ -32,7 +32,7 @@ usage: $0 [options]
-c, --config <file> config file
-m, --moddir <dir> drivers directory
-k, --kernel <ver> kernel version
-f, --files <dir> files directory
-F, --files <dir> files directory
-d, --debug 0|1 debug mode
-f, --force 0|1 overwrite existing initramfs image
@ -58,7 +58,7 @@ parse_args() {
_kernel="${2:?}"
shift 2
;;
-f | --files)
-F | --files)
_filesdir="${2:?}"
shift 2
;;
@ -265,6 +265,12 @@ install_driver() {
driver="${driver##*net*}"
driver="${driver#insmod }"
# exclude user specified drivers
[ "$drivers_exclude" ] &&
for _exclude_driver in $drivers_exclude; do
driver="${driver##*${_exclude_driver}*}"
done
# check empty
[ "$driver" ] || continue