From 57fec9fcfddc9ebaf3885dfd8d314c8c67bac117 Mon Sep 17 00:00:00 2001 From: Sevinj Aghayeva Date: Fri, 8 Apr 2022 06:43:49 -0400 Subject: mbuto: handle tokens that start with -- Since we are going over the output of modprobe and trying to figure out if the token is a module name, sometimes we get strings like "--install", which breaks basename and modprobe commands. To fix this problem, we append "--" to these commands. Signed-off-by: Sevinj Aghayeva --- mbuto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mbuto b/mbuto index 6306d37..3884f5a 100755 --- a/mbuto +++ b/mbuto @@ -701,10 +701,10 @@ kmod_add() { fi for __t in $("${MODPROBE}" -S "${KERNEL}" -d "${__d_opt}" -q \ - --show-depends "$(${BASENAME} ${1})"); do - __t="$(${BASENAME} "${__t%*.ko}")" + --show-depends -- "$(${BASENAME} -- ${1})"); do + __t="$(${BASENAME} -- "${__t%*.ko}")" if ${MODPROBE} -S "${KERNEL}" -d "${__d_opt}" -q \ - --show-depends "$(${BASENAME} "${__t}")"; then + --show-depends -- "$(${BASENAME} -- "${__t}")"; then __src="$(${FIND} ${__find_path} -name "${__t}.ko")" __dst="${wd}/${__src##${MODDIR}}" if ! "${DIFF}" "${__src}" "${__dst}" 2>/dev/null; then -- cgit v1.2.3