Skip to content

Commit

Permalink
Print messages for user feedback only once
Browse files Browse the repository at this point in the history
  • Loading branch information
scaronni committed Nov 29, 2024
1 parent c92fcf8 commit d9e0a8c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions dkms.in
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ check_version_sanity()
fi

if [[ ${kernels_module[1]} ]]; then
warn "Warning! Cannot do version sanity checking because multiple ${4}$module_suffix modules were found in kernel $1."
warn "Cannot do version sanity checking because multiple ${4}$module_suffix modules were found in kernel $1."
return 0
fi
local dkms_module
Expand Down Expand Up @@ -1870,19 +1870,19 @@ do_status_weak()
module_status_built_extra() (
set_module_suffix "$3"
read_conf "$3" "$4" "$dkms_tree/$1/$2/source/dkms.conf" 2>/dev/null
[[ -d $dkms_tree/$1/original_module/$3/$4 ]] && echo -n " (original_module exists)"
[[ -d $dkms_tree/$1/original_module/$3/$4 ]] && echo -n " (Original modules exist)"
for ((count=0; count < ${#dest_module_name[@]}; count++)); do
tree_mod=$(compressed_or_uncompressed "$dkms_tree/$1/$2/$3/$4/module" "${dest_module_name[$count]}")
if ! [[ -n "$tree_mod" ]]; then
echo -n " (WARNING! Missing some built modules!)"
elif _is_module_installed "$@"; then
if _is_module_installed "$@"; then
real_dest="$(find_actual_dest_module_location "$1" $count "$3" "$4")"
real_dest_mod=$(compressed_or_uncompressed "$install_tree/$3${real_dest}" "${dest_module_name[$count]}")
if ! diff -q "$tree_mod" "$real_dest_mod" >/dev/null 2>&1; then
echo -n " (WARNING! Diff between built and installed module!)"
fi
fi
done
if ! [[ -n "$tree_mod" ]]; then
echo -n " (Built modules are missing in the kernel modules folder)"
elif ! diff -q "$tree_mod" "$real_dest_mod" >/dev/null 2>&1; then
warn " (Differences between built and installed modules)"
fi
)

# Return a list of all the modules that are either built or installed.
Expand Down

0 comments on commit d9e0a8c

Please sign in to comment.