aboutgitcode
path: root/mbuto
diff options
context:
space:
mode:
authorSevinj Aghayeva <sevinj.aghayeva@gmail.com>2022-04-08 06:33:54 -0400
committerStefano Brivio <sbrivio@redhat.com>2022-04-08 21:26:24 +0200
commit9cf88c9a6f2faba91f2eb884adbcdb5ba96416d5 (patch)
tree166a2a107885c34a8e5af553679227a23044ffb6 /mbuto
parent69112103da2b8ff061d58b914df229d41c2edc5e (diff)
downloadmbuto-9cf88c9a6f2faba91f2eb884adbcdb5ba96416d5.tar
mbuto-9cf88c9a6f2faba91f2eb884adbcdb5ba96416d5.tar.gz
mbuto-9cf88c9a6f2faba91f2eb884adbcdb5ba96416d5.tar.bz2
mbuto-9cf88c9a6f2faba91f2eb884adbcdb5ba96416d5.tar.lz
mbuto-9cf88c9a6f2faba91f2eb884adbcdb5ba96416d5.tar.xz
mbuto-9cf88c9a6f2faba91f2eb884adbcdb5ba96416d5.tar.zst
mbuto-9cf88c9a6f2faba91f2eb884adbcdb5ba96416d5.zip
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 <sevinj.aghayeva@gmail.com>
Diffstat (limited to 'mbuto')
-rwxr-xr-xmbuto8
1 files 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}}"