From 9cf88c9a6f2faba91f2eb884adbcdb5ba96416d5 Mon Sep 17 00:00:00 2001 From: Sevinj Aghayeva Date: Fri, 8 Apr 2022 06:33:54 -0400 Subject: mbuto: add the -d switch back, but remove it from the variable When specify -d as part of __d_opt variable, it is passed as a single string to modprobe, like "-d /foo/bar", and modprobe fails to figure out the directory name correctly. With this patch, we pass it as two different strings, like "-d" "/foo/bar", and modprobe works correctly. Signed-off-by: Sevinj Aghayeva --- mbuto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mbuto b/mbuto index 884a8bf..6306d37 100755 --- a/mbuto +++ b/mbuto @@ -693,17 +693,17 @@ kmod_add() { info "Adding kernel module ${1}" if [ -z "${MODDIR}" ]; then - __d_opt="" + __d_opt="/" __find_path="/lib/modules/${KERNEL}" else - __d_opt="-d ${MODDIR}" + __d_opt="${MODDIR}" __find_path="${MODDIR}/lib/modules" fi - for __t in $("${MODPROBE}" -S "${KERNEL}" "${__d_opt}" -q \ + for __t in $("${MODPROBE}" -S "${KERNEL}" -d "${__d_opt}" -q \ --show-depends "$(${BASENAME} ${1})"); do __t="$(${BASENAME} "${__t%*.ko}")" - if ${MODPROBE} -S "${KERNEL}" "${__d_opt}" -q \ + if ${MODPROBE} -S "${KERNEL}" -d "${__d_opt}" -q \ --show-depends "$(${BASENAME} "${__t}")"; then __src="$(${FIND} ${__find_path} -name "${__t}.ko")" __dst="${wd}/${__src##${MODDIR}}" -- cgit v1.2.3