diff options
-rwxr-xr-x | mbuto | 37 |
1 files changed, 21 insertions, 16 deletions
@@ -855,24 +855,29 @@ kmod_add() { __f=$("${MODPROBE}" -S "${KERNEL}" -d "${__d_opt}" -q \ --show-depends -- "$(${BASENAME} -- ${1})") + case ${__f} in - "builtin "*) - kmod_node "${1}" - ;; - *) - for __t in ${__f}; do - __t="$(${BASENAME} -- "${__t%*.ko}")" - if ${MODPROBE} -S "${KERNEL}" -d "${__d_opt}" -q \ - --show-depends -- "$(${BASENAME} -- "${__t}")" >/dev/null; then - __src="$(${FIND} ${__find_path} -name "${__t}.ko")" - __dst="${wd}${__src##${MODDIR}}" - if ! "${DIFF}" "${__src}" "${__dst}" 2>/dev/null; then - "${MKDIR}" -p "$("${DIRNAME}" "${__dst}")" - "${CP}" -a "${__src}" "${__dst}" - fi - kmod_node "${1}" + "builtin "*) + kmod_node "${1}" + ;; + *) + for __t in ${__f}; do + __t="$(${BASENAME} -- "${__t%*.ko}")" + if ${MODPROBE} -S "${KERNEL}" -d "${__d_opt}" -q \ + --show-depends -- "$(${BASENAME} -- "${__t}")" >/dev/null; then + + __src="$(${FIND} ${__find_path} -name "${__t}.ko")" + [ -z "${__src}" ] && continue + + __dst="${wd}${__src##${MODDIR}}" + if ! "${DIFF}" "${__src}" "${__dst}" 2>/dev/null; then + "${MKDIR}" -p "$("${DIRNAME}" "${__dst}")" + "${CP}" -a "${__src}" "${__dst}" fi - done + + kmod_node "${1}" + fi + done esac } |