Fixed modules load check

This commit is contained in:
pocopico 2022-05-02 17:44:17 +03:00
parent 28c57536bc
commit 66e9c8b328
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ _load_kmods() {
echo "Loading kmod #${_kmod_num} \"${kmod_file}\" for ${name} (args: ${_kmod_args})"
# shellcheck disable=SC2086
_kmodname="${kmod_file::-3}"
if [ $(lsmod | grep $_kmodname | wc -l) -eq 0 ]; then
if [ $(lsmod | grep -w $_kmodname | wc -l) -eq 0 ]; then
(cd "${name}" && insmod "${kmod_file}" ${_kmod_args})
if [ $? -ne 0 ]; then
echo "ERROR: kernel extensions \"${kmod_file}\" from ${name} failed to load"