move moddir check to caller side

This commit is contained in:
illiliti 2020-02-26 20:22:30 +03:00
parent efd23620f4
commit 5d079b210d

View File

@ -259,9 +259,6 @@ install_luks() {
}
install_driver() {
# check monolithic kernel(builtin drivers)
[ -d "${moddir}/${kernel}" ] || return
driver="$1"
driver="${driver##*/}"
driver="${driver%%.*}"
@ -485,9 +482,9 @@ create_structure
create_symlinks
install_requirements
if [ "$hostonly" = 1 ]; then
if [ -d "$moddir" ] && [ "$hostonly" = 1 ]; then
install_hostonly_drivers
else
elif [ -d "$moddir" ]; then
install_all_drivers
fi