aboutgitcode
diff options
context:
space:
mode:
authorSevinj Aghayeva <sevinj.aghayeva@gmail.com>2022-04-08 06:43:49 -0400
committerStefano Brivio <sbrivio@redhat.com>2022-04-08 21:26:24 +0200
commit57fec9fcfddc9ebaf3885dfd8d314c8c67bac117 (patch)
treee4a279480b466e214bcbeccaefe3e6b8d68233bf
parent9cf88c9a6f2faba91f2eb884adbcdb5ba96416d5 (diff)
downloadmbuto-57fec9fcfddc9ebaf3885dfd8d314c8c67bac117.tar
mbuto-57fec9fcfddc9ebaf3885dfd8d314c8c67bac117.tar.gz
mbuto-57fec9fcfddc9ebaf3885dfd8d314c8c67bac117.tar.bz2
mbuto-57fec9fcfddc9ebaf3885dfd8d314c8c67bac117.tar.lz
mbuto-57fec9fcfddc9ebaf3885dfd8d314c8c67bac117.tar.xz
mbuto-57fec9fcfddc9ebaf3885dfd8d314c8c67bac117.tar.zst
mbuto-57fec9fcfddc9ebaf3885dfd8d314c8c67bac117.zip
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 <sevinj.aghayeva@gmail.com>
-rwxr-xr-xmbuto6
1 files 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