Skip to content

Commit

Permalink
update through script - 2024-11-14 15:14:01
Browse files Browse the repository at this point in the history
  • Loading branch information
oasido committed Nov 14, 2024
1 parent 7260239 commit d82f1f4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .local/bin/scripts/dkms-clean
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ dkms_modules=$(sudo dkms status)
echo "$dkms_modules" | while read -r line; do
module_name=$(echo "$line" | cut -d',' -f1)
module_version=$(echo "$line" | cut -d',' -f2 | tr -d ' ')

kernel_version=$(echo "$line" | cut -d',' -f2 | tr -d ' ')

if [ "$kernel_version" != "$current_kernel" ]; then
echo "Removing $module_name $module_version for kernel $kernel_version"
sudo dkms remove "$module_name/$module_version" -k "$kernel_version"
sudo dkms remove -k "$kernel_version" "$module_name/$module_version"
else
echo "Keeping $module_name $module_version for current kernel $current_kernel"
fi
done

0 comments on commit d82f1f4

Please sign in to comment.